diff --git a/src/assignments/assignment08.rs b/src/assignments/assignment08.rs index a4f12c3..972b1d3 100644 --- a/src/assignments/assignment08.rs +++ b/src/assignments/assignment08.rs @@ -8,7 +8,7 @@ /// Returns an anonymous function that applies the given function `f` for `n` times. /// /// For instance, `repeat(3, f)(x)` roughly translates to `f(f(f(x)))`. -pub fn repeat T>(n: usize, f: F) -> impl FnMut(T) -> T { +pub fn repeat T>(n: usize, mut f: F) -> impl FnMut(T) -> T { todo!(); f // This line has been added to prevent compile error. You can erase this line. } diff --git a/src/assignments/mod.rs b/src/assignments/mod.rs index 07197ef..3589351 100644 --- a/src/assignments/mod.rs +++ b/src/assignments/mod.rs @@ -1,6 +1,7 @@ //! KAIST CS220 Assignments. #![allow(dead_code)] +#![allow(unused_mut)] #![allow(unreachable_code)] #![allow(unused_variables)]