Skip to content

Commit 7c9439b

Browse files
committed
test: Added regression test for #13
1 parent bf113be commit 7c9439b

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

soa-rs-testing/src/lib.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
#![cfg(test)]
22
#![allow(clippy::disallowed_names)]
33

4+
use std::sync::Mutex;
5+
46
use soa_rs::{soa, AsMutSlice, AsSlice, AsSoaRef, Soa, Soars};
57

68
#[derive(Soars, Debug, Default, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
@@ -659,3 +661,10 @@ fn serde() {
659661
let deserial: Soa<Test> = serde_json::from_str(&serial).unwrap();
660662
assert_eq!(original, deserial);
661663
}
664+
665+
#[test]
666+
fn mutex() {
667+
// Regression test for https://github.com/tim-harding/soa-rs/issues/13
668+
#[derive(Soars)]
669+
struct M(Mutex<usize>);
670+
}

0 commit comments

Comments
 (0)