-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
Got the following error while trying to compile:
cargo run --example simpleerror[E0631]: type mismatch in function arguments
--> examples/simple.rs:14:36
|
14 | ItemList::new(rustofi_entries, Box::new(simple_callback)).display("Select an entry".to_string())
| ^^^^^^^^^^^^^^^^^^^^^^^^^ expected signature of `for<'r> fn(&'r mut std::string::String) -> _`
...
17 | pub fn simple_callback(s: &String) -> RustofiResult {
| --------------------------------------------------- found signature of `for<'r> fn(&'r std::string::String) -> _`
|
= note: required because of the requirements on the impl of `rustofi::RustofiCallback<std::string::String>` for `for<'r> fn(&'r std::string::String) -> rustofi::RustofiResult {simple_callback}`
= note: required for the cast to the object type `dyn for<'r> rustofi::RustofiCallback<std::string::String, Output = std::result::Result<(), std::string::String>>`
Metadata
Metadata
Assignees
Labels
No labels