1pub use inner::*;
4
5#[cfg(feature = "sync_fs")]
6mod inner {
7 #![allow(clippy::disallowed_types)]
8
9 pub use core::marker::Send as MaybeSend;
10 pub use core::marker::Sync as MaybeSync;
11 pub use std::sync::Arc as MaybeArc;
12}
13
14#[cfg(not(feature = "sync_fs"))]
15mod inner {
16 pub use std::rc::Rc as MaybeArc;
17
18 pub trait MaybeSync {}
19 impl<T> MaybeSync for T where T: ?Sized {}
20 pub trait MaybeSend {}
21 impl<T> MaybeSend for T where T: ?Sized {}
22}
23
24#[allow(clippy::disallowed_types)]
25#[inline]
26pub fn new_rc<T>(value: T) -> MaybeArc<T> {
27 MaybeArc::new(value)
28}