@@ -17,6 +17,8 @@ pub type OsShMemProvider = Win32ShMemProvider;
1717#[ cfg( all( windows, feature = "std" ) ) ]
1818pub type OsShMem = Win32ShMem ;
1919
20+ use crate :: Error ;
21+
2022#[ cfg( all( target_os = "android" , feature = "std" ) ) ]
2123use crate :: bolts:: os:: ashmem_server:: ServedShMemProvider ;
2224#[ cfg( all( target_os = "android" , feature = "std" ) ) ]
@@ -39,7 +41,7 @@ use alloc::{rc::Rc, string::ToString};
3941use core:: { cell:: RefCell , fmt:: Debug , mem:: ManuallyDrop } ;
4042
4143#[ cfg( all( unix, feature = "std" ) ) ]
42- use crate :: { bolts:: os:: pipes:: Pipe , Error } ;
44+ use crate :: bolts:: os:: pipes:: Pipe ;
4345#[ cfg( all( unix, feature = "std" ) ) ]
4446use std:: io:: { Read , Write } ;
4547
@@ -252,7 +254,7 @@ impl<T: ShMemProvider> Drop for RcShMem<T> {
252254/// that can use internal mutability.
253255/// Useful if the `ShMemProvider` needs to keep local state.
254256#[ derive( Debug , Clone ) ]
255- #[ cfg( unix) ]
257+ #[ cfg( all ( unix, feature = "std" ) ) ]
256258pub struct RcShMemProvider < T : ShMemProvider > {
257259 /// The wrapped [`ShMemProvider`].
258260 internal : Rc < RefCell < T > > ,
@@ -266,10 +268,10 @@ pub struct RcShMemProvider<T: ShMemProvider> {
266268 parent_child_pipe : Option < Pipe > ,
267269}
268270
269- #[ cfg( unix) ]
271+ #[ cfg( all ( unix, feature = "std" ) ) ]
270272unsafe impl < T : ShMemProvider > Send for RcShMemProvider < T > { }
271273
272- #[ cfg( unix) ]
274+ #[ cfg( all ( unix, feature = "std" ) ) ]
273275impl < T > ShMemProvider for RcShMemProvider < T >
274276where
275277 T : ShMemProvider + alloc:: fmt:: Debug ,
@@ -339,7 +341,7 @@ where
339341 }
340342}
341343
342- #[ cfg( unix) ]
344+ #[ cfg( all ( unix, feature = "std" ) ) ]
343345impl < T > RcShMemProvider < T >
344346where
345347 T : ShMemProvider ,
@@ -402,7 +404,7 @@ where
402404 }
403405}
404406
405- #[ cfg( unix) ]
407+ #[ cfg( all ( unix, feature = "std" ) ) ]
406408impl < T > Default for RcShMemProvider < T >
407409where
408410 T : ShMemProvider + alloc:: fmt:: Debug ,
0 commit comments