Support multi threads under send feature flag

This commit is contained in:
Alex Orlenko
2024-07-08 13:14:28 +01:00
parent c1395ab543
commit 658f2a13ea
13 changed files with 229 additions and 109 deletions
+8 -5
View File
@@ -202,9 +202,12 @@ impl Serialize for String {
}
}
// #[cfg(test)]
// mod assertions {
// use super::*;
#[cfg(test)]
mod assertions {
use super::*;
// static_assertions::assert_not_impl_any!(String: Send);
// }
#[cfg(not(feature = "send"))]
static_assertions::assert_not_impl_any!(String: Send);
#[cfg(feature = "send")]
static_assertions::assert_impl_all!(String: Send, Sync);
}