OK, here's my MCVE, right off the bat.
fn do_something (string: &'static str) -> Result<&str, isize> {
Ok(string)
}
fn main() {
let place = Some("hello".to_string());
match place {
Some(input) => {
let place = &input[..];
let something = do_something(place);
}
_ => (),
}
}
I can't seem to figure out a way in which to satisfy do_something
. In my actual code, do_something
is a library function, so I can't change it's signature.
- Thanks