From 38cf98d92b2745c554aac8538f37dbb46d8f2250 Mon Sep 17 00:00:00 2001 From: Remo Senekowitsch Date: Fri, 5 Jan 2024 16:02:41 +0100 Subject: [PATCH] Fix clippy warning in example.rs of wordy --- exercises/practice/wordy/.meta/example.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/practice/wordy/.meta/example.rs b/exercises/practice/wordy/.meta/example.rs index 6ceceeed4..81e201cec 100644 --- a/exercises/practice/wordy/.meta/example.rs +++ b/exercises/practice/wordy/.meta/example.rs @@ -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 {