Skip to content

Commit

Permalink
Fix clippy warning in example.rs of wordy
Browse files Browse the repository at this point in the history
  • Loading branch information
senekor committed Jan 5, 2024
1 parent 3c51a29 commit 38cf98d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion exercises/practice/wordy/.meta/example.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ fn apply_op<'a, 'b>(num1: i32, words: &'a [Token<'b>]) -> Option<(i32, &'a [Toke
[Token::NonNumber("multiplied"), Token::NonNumber("by")] => Some(num1 * num2),
[Token::NonNumber("divided"), Token::NonNumber("by")] => Some(num1 / num2),
[Token::NonNumber("raised"), Token::NonNumber("to"), Token::NonNumber("the")] => {
if Some(&Token::NonNumber("power")) == remainder.get(0) {
if Some(&Token::NonNumber("power")) == remainder.first() {
remainder = remainder.get(1..)?;
Some(num1.pow(num2 as u32))
} else {
Expand Down

0 comments on commit 38cf98d

Please sign in to comment.