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
It seems like when I get a &Result<T, E>, miette is unable to handle it at all. IntoDiagnostic requires the error to be Send + Sync + 'static, which is not always possible.
This case occurs when I have a Peekable iterator returning a result type:
let some_iter = (...).peekable();loop{let item:Option<&Result<T,E>> = some_iter.peek();let inner:&Result<T,E> = item.unwrap();let t = inner.into_diagnostic()?;// <-- Error about unable to take *inner because into_diagnostic() takes `self`let t = inner.as_ref().into_diagnostic()?;// <- Error about `item` not 'static//...}
It forces me to unwrap because the types just don't check.
The text was updated successfully, but these errors were encountered:
It seems like when I get a
&Result<T, E>
, miette is unable to handle it at all.IntoDiagnostic
requires the error to beSend + Sync + 'static
, which is not always possible.This case occurs when I have a Peekable iterator returning a result type:
It forces me to unwrap because the types just don't check.
The text was updated successfully, but these errors were encountered: