You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I just want to simply use ? operator to propagate errors. Don't map_err.
use heapless::String;
use anyhow::Result;
pub fn test() -> Result<String<256>> {
let mut phrase = String::new();
phrase.push_str("XX")?;
Ok(phrase)
}
the trait bound `(): core::error::Error` is not satisfied
the trait `FromResidual<Result<Infallible, E>>` is implemented for `Result<T, F>`
required for `anyhow::Error` to implement `From<()>`
required for `Result<String<256>, anyhow::Error>` to implement `FromResidual<Result<Infallible, ()>>`rustc[Click for full compiler diagnostic](rust-analyzer-diagnostics-view:/diagnostic message [0]?0#file:///home/life/Develop/job/my/embedded/ohw-wallets/src/mnemonic.rs)
1.81 stabilizes the Error trait in core, allowing usage of the trait in #![no_std] libraries.
The text was updated successfully, but these errors were encountered: