diff --git a/ctru-rs/examples/software-keyboard.rs b/ctru-rs/examples/software-keyboard.rs index 144b587..40635de 100644 --- a/ctru-rs/examples/software-keyboard.rs +++ b/ctru-rs/examples/software-keyboard.rs @@ -19,7 +19,7 @@ fn main() { // Custom filter callback to handle the given input. // Using this callback it's possible to integrate the applet // with custom error messages when the input is incorrect. - keyboard.set_filter_callback(Some(Box::new(|str| { + keyboard.set_filter_callback(Some(Box::new(move |str| { if str.contains("boo") { return (CallbackResult::Retry, Some("Ah, you scared me!".into())); } diff --git a/ctru-rs/src/applets/swkbd.rs b/ctru-rs/src/applets/swkbd.rs index 69b6f98..c5f386c 100644 --- a/ctru-rs/src/applets/swkbd.rs +++ b/ctru-rs/src/applets/swkbd.rs @@ -348,7 +348,7 @@ impl SoftwareKeyboard { /// /// let mut keyboard = SoftwareKeyboard::default(); /// - /// keyboard.set_filter_callback(Some(Box::new(|str| { + /// keyboard.set_filter_callback(Some(Box::new(move |str| { /// if str.contains("boo") { /// return (CallbackResult::Retry, Some("Ah, you scared me!".into())); /// }