Skip to content

Commit

Permalink
Merge pull request rust-lang#219 from stmtk1/master
Browse files Browse the repository at this point in the history
rewrite redundant expression
  • Loading branch information
TheDan64 authored Oct 19, 2020
2 parents 5c4adc1 + bcc6ac7 commit 0bc7929
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/kaleidoscope/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ pub struct Lexer<'a> {
impl<'a> Lexer<'a> {
/// Creates a new `Lexer`, given its source `input`.
pub fn new(input: &'a str) -> Lexer<'a> {
Lexer { input: input, chars: Box::new(input.chars().peekable()), pos: 0 }
Lexer { input, chars: Box::new(input.chars().peekable()), pos: 0 }
}

/// Lexes and returns the next `Token` from the source code.
Expand Down

0 comments on commit 0bc7929

Please sign in to comment.