WiSaGaN/simple-error

Missing .into() in formatted version of bail! results in unboxable error

Closed this issue · 1 comments

The following compiles:

fn something() -> Result<(), Box<Error>> {
  bail!("Oops");
}

The following does not:

fn something() -> Result<(), Box<Error>> {
  bail!("Oops {}", "argument");
}

I think it's because of a missing .into() in this line:

https://github.com/WiSaGaN/simple-error/blob/master/src/lib.rs#L268

Thanks for the report! This has been fixed in 196c524. I have published 0.1.13 to include this change.