summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLibravatar Taiki Endo <te316e89@gmail.com>2021-01-29 14:03:27 +0900
committerLibravatar Taiki Endo <te316e89@gmail.com>2021-01-29 14:03:27 +0900
commit14d900d8359a2b011e1f90fd54f7ad76b103b459 (patch)
tree66d281c3c59c774824b5e9295544a0f54016a762 /src
parent8d882d787e6b7fd7c2435f42f82933e2ed904edf (diff)
downloadiced-14d900d8359a2b011e1f90fd54f7ad76b103b459.tar.gz
iced-14d900d8359a2b011e1f90fd54f7ad76b103b459.tar.bz2
iced-14d900d8359a2b011e1f90fd54f7ad76b103b459.zip
Make iced::Error Send + Sync
Diffstat (limited to 'src')
-rw-r--r--src/error.rs13
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>();
+ }
+}