Skip to content

Commit 64d8a4b

Browse files
committed
Add a test that make sure Error is Send + Sync
1 parent cbaefc2 commit 64d8a4b

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

heed/src/lib.rs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,3 +124,16 @@ impl From<io::Error> for Error {
124124
}
125125

126126
pub type Result<T> = result::Result<T, Error>;
127+
128+
#[cfg(test)]
129+
mod tests {
130+
use super::*;
131+
132+
#[test]
133+
fn error_is_send_sync() {
134+
fn give_me_send_sync<T: Send + Sync>(_: T) {}
135+
136+
let error = Error::Encoding(Box::from("There is an issue, you know?"));
137+
give_me_send_sync(error);
138+
}
139+
}

0 commit comments

Comments
 (0)