Closed
Description
rustc
gives
error: mismatched types: expected `core::result::Result<int,~str>` but found `core::result::Result<<generic integer #0>,&'static str>` (expected box but found &-ptr)
for
fn example() -> Result<int, ~str> {
match Some("") {
Some("") => Ok(0),
_ => Err("")
}
}
rustc
could suggest using to_owned()
.