diff options
| author | 2021-01-29 14:03:27 +0900 | |
|---|---|---|
| committer | 2021-01-29 14:03:27 +0900 | |
| commit | 14d900d8359a2b011e1f90fd54f7ad76b103b459 (patch) | |
| tree | 66d281c3c59c774824b5e9295544a0f54016a762 /src | |
| parent | 8d882d787e6b7fd7c2435f42f82933e2ed904edf (diff) | |
| download | iced-14d900d8359a2b011e1f90fd54f7ad76b103b459.tar.gz iced-14d900d8359a2b011e1f90fd54f7ad76b103b459.tar.bz2 iced-14d900d8359a2b011e1f90fd54f7ad76b103b459.zip | |
Make iced::Error Send + Sync
Diffstat (limited to '')
| -rw-r--r-- | src/error.rs | 13 | 
1 files changed, 12 insertions, 1 deletions
| diff --git a/src/error.rs b/src/error.rs index 31b87d17..c8fa6636 100644 --- a/src/error.rs +++ b/src/error.rs @@ -9,7 +9,7 @@ pub enum Error {      /// The application window could not be created.      #[error("the application window could not be created")] -    WindowCreationFailed(Box<dyn std::error::Error>), +    WindowCreationFailed(Box<dyn std::error::Error + Send + Sync>),      /// A suitable graphics adapter or device could not be found.      #[error("a suitable graphics adapter or device could not be found")] @@ -32,3 +32,14 @@ impl From<iced_winit::Error> for Error {          }      }  } + +#[cfg(test)] +mod tests { +    use super::*; + +    #[test] +    fn assert_send_sync() { +        fn _assert<T: Send + Sync>() {} +        _assert::<Error>(); +    } +} | 
