Skip to content

Commit 958f20f

Browse files
committed
minor: dead code
1 parent 7f28b49 commit 958f20f

File tree

2 files changed

+1
-13
lines changed

2 files changed

+1
-13
lines changed

crates/syntax/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ use text_edit::Indel;
4848

4949
pub use crate::{
5050
ast::{AstNode, AstToken},
51-
parsing::lexer::{lex_single_syntax_kind, lex_single_valid_syntax_kind, tokenize, Token},
51+
parsing::lexer::{lex_single_syntax_kind, tokenize, Token},
5252
ptr::{AstPtr, SyntaxNodePtr},
5353
syntax_error::SyntaxError,
5454
syntax_node::{

crates/syntax/src/parsing/lexer.rs

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -75,18 +75,6 @@ pub fn lex_single_syntax_kind(text: &str) -> Option<(SyntaxKind, Option<SyntaxEr
7575
Some((first_token.kind, err))
7676
}
7777

78-
/// The same as `lex_single_syntax_kind()` but returns only `SyntaxKind` and
79-
/// returns `None` if any tokenization error occurred.
80-
///
81-
/// Beware that unescape errors are not checked at tokenization time.
82-
pub fn lex_single_valid_syntax_kind(text: &str) -> Option<SyntaxKind> {
83-
let (single_token, err) = lex_single_syntax_kind(text)?;
84-
if err.is_some() {
85-
return None;
86-
}
87-
Some(single_token)
88-
}
89-
9078
/// Returns `SyntaxKind` and `Option<SyntaxError>` of the first token
9179
/// encountered at the beginning of the string.
9280
///

0 commit comments

Comments
 (0)