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
With the recent addition of error handling, I tried to wrap an iced::Result with an anyhow::Result, but it's not working because I get this error:
error[E0277]: `(dyn StdError + 'static)` cannot be sent between threads safely
--> src\main.rs:51:23
|
51 | App::run(settings)?;
| ^ `(dyn StdError + 'static)` cannot be sent between threads safely
|
= help: the trait `std::marker::Send` is not implemented for `(dyn StdError + 'static)`
= note: required because of the requirements on the impl of `std::marker::Send` for `Unique<(dyn StdError + 'static)>`
= note: required because it appears within the type `Box<(dyn StdError + 'static)>`
= note: required because it appears within the type `iced::Error`
= note: required because of the requirements on the impl of `From<iced::Error>` for `anyhow::Error`
= note: required by `std::convert::From::from`
error[E0277]: `(dyn StdError + 'static)` cannot be shared between threads safely
--> src\main.rs:51:23
|
51 | App::run(settings)?;
| ^ `(dyn StdError + 'static)` cannot be shared between threads safely
|
= help: the trait `Sync` is not implemented for `(dyn StdError + 'static)`
= note: required because of the requirements on the impl of `Sync` for `Unique<(dyn StdError + 'static)>`
= note: required because it appears within the type `Box<(dyn StdError + 'static)>`
= note: required because it appears within the type `iced::Error`
= note: required because of the requirements on the impl of `From<iced::Error>` for `anyhow::Error`
= note: required by `std::convert::From::from`
Example code:
use anyhow::Result;fnmain() -> Result<()>{use iced::{Application,Settings};App::run(Settings::default())?;Ok(())}
The text was updated successfully, but these errors were encountered:
// FIXME: `iced::Error` is not `Send + Sync`, and so is incompatible with `anyhow::Result`.// See this issue for more information: https://github.com/hecrj/iced/issues/516
pikelet_editor::run().map_err(|err| anyhow!("{}", err))
With the recent addition of error handling, I tried to wrap an iced::Result with an anyhow::Result, but it's not working because I get this error:
Example code:
The text was updated successfully, but these errors were encountered: