Skip to content

Commit

Permalink
Fix elided_named_lifetimes lints
Browse files Browse the repository at this point in the history
  • Loading branch information
waywardmonkeys committed Dec 6, 2024
1 parent fcc0dee commit 6ab87c8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/tokenizer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ pub struct Token<'text> {
impl<'text> Token<'text> {
/// Construct a `Token`. The lifetime parameter `'text` refers
/// to the lifetime of the text being tokenized.
pub fn new(text: &'text str, token_type: TokenType, location: SourceLocation) -> Token {
pub fn new(text: &'text str, token_type: TokenType, location: SourceLocation) -> Token<'text> {
Token {
text,
token_type,
Expand Down Expand Up @@ -202,7 +202,7 @@ struct Tokenizer<'text> {
}

impl<'text> Tokenizer<'text> {
fn new(text: &'text str) -> Tokenizer {
fn new(text: &'text str) -> Tokenizer<'text> {
Tokenizer {
text,
state: State::Initial,
Expand Down

0 comments on commit 6ab87c8

Please sign in to comment.