@@ -46,25 +46,13 @@ impl FileDesc {
4646 fd
4747 }
4848
49- #[ cfg( target_os = "freertos" ) ]
50- pub fn read ( & self , _buf : & mut [ u8 ] ) -> io:: Result < usize > {
51- crate :: sys:: unsupported ( )
52- }
53-
54- #[ cfg( not( target_os = "freertos" ) ) ]
5549 pub fn read ( & self , buf : & mut [ u8 ] ) -> io:: Result < usize > {
5650 let ret = cvt ( unsafe {
5751 libc:: read ( self . fd , buf. as_mut_ptr ( ) as * mut c_void , cmp:: min ( buf. len ( ) , max_len ( ) ) )
5852 } ) ?;
5953 Ok ( ret as usize )
6054 }
6155
62- #[ cfg( target_os = "freertos" ) ]
63- pub fn read_vectored ( & self , _bufs : & mut [ IoSliceMut < ' _ > ] ) -> io:: Result < usize > {
64- crate :: sys:: unsupported ( )
65- }
66-
67- #[ cfg( not( target_os = "freertos" ) ) ]
6856 pub fn read_vectored ( & self , bufs : & mut [ IoSliceMut < ' _ > ] ) -> io:: Result < usize > {
6957 let ret = cvt ( unsafe {
7058 libc:: readv (
@@ -115,25 +103,13 @@ impl FileDesc {
115103 }
116104 }
117105
118- #[ cfg( target_os = "freertos" ) ]
119- pub fn write ( & self , _buf : & [ u8 ] ) -> io:: Result < usize > {
120- crate :: sys:: unsupported ( )
121- }
122-
123- #[ cfg( not( target_os = "freertos" ) ) ]
124106 pub fn write ( & self , buf : & [ u8 ] ) -> io:: Result < usize > {
125107 let ret = cvt ( unsafe {
126108 libc:: write ( self . fd , buf. as_ptr ( ) as * const c_void , cmp:: min ( buf. len ( ) , max_len ( ) ) )
127109 } ) ?;
128110 Ok ( ret as usize )
129111 }
130112
131- #[ cfg( target_os = "freertos" ) ]
132- pub fn write_vectored ( & self , _bufs : & [ IoSlice < ' _ > ] ) -> io:: Result < usize > {
133- crate :: sys:: unsupported ( )
134- }
135-
136- #[ cfg( not( target_os = "freertos" ) ) ]
137113 pub fn write_vectored ( & self , bufs : & [ IoSlice < ' _ > ] ) -> io:: Result < usize > {
138114 let ret = cvt ( unsafe {
139115 libc:: writev (
0 commit comments