@@ -9,9 +9,8 @@ use core::marker::PhantomData;
9
9
use core:: mem:: { self , MaybeUninit } ;
10
10
use core:: ops:: { Deref , DerefMut } ;
11
11
use core:: pin:: Pin ;
12
-
13
12
#[ cfg( feature = "std" ) ]
14
- use std:: io:: Read ;
13
+ use std:: io:: { self , Read } ;
15
14
16
15
/// Binding to C++ `std::unique_ptr<T, std::default_delete<T>>`.
17
16
#[ repr( C ) ]
@@ -184,31 +183,32 @@ where
184
183
}
185
184
}
186
185
187
- /// Forwarding `Read` trait implementation in a manner similar to `Box<T>`. Note that the
188
- /// implementation will panic for null `UniquePtr<T>`.
186
+ /// Forwarding `Read` trait implementation in a manner similar to `Box<T>`.
187
+ ///
188
+ /// Note that the implementation will panic for null `UniquePtr<T>`.
189
189
#[ cfg( feature = "std" ) ]
190
190
impl < T > Read for UniquePtr < T >
191
191
where
192
192
for < ' a > Pin < & ' a mut T > : Read ,
193
193
T : UniquePtrTarget ,
194
194
{
195
195
#[ inline]
196
- fn read ( & mut self , buf : & mut [ u8 ] ) -> std :: io:: Result < usize > {
196
+ fn read ( & mut self , buf : & mut [ u8 ] ) -> io:: Result < usize > {
197
197
self . pin_mut ( ) . read ( buf)
198
198
}
199
199
200
200
#[ inline]
201
- fn read_to_end ( & mut self , buf : & mut std:: vec:: Vec < u8 > ) -> std :: io:: Result < usize > {
201
+ fn read_to_end ( & mut self , buf : & mut std:: vec:: Vec < u8 > ) -> io:: Result < usize > {
202
202
self . pin_mut ( ) . read_to_end ( buf)
203
203
}
204
204
205
205
#[ inline]
206
- fn read_to_string ( & mut self , buf : & mut std:: string:: String ) -> std :: io:: Result < usize > {
206
+ fn read_to_string ( & mut self , buf : & mut std:: string:: String ) -> io:: Result < usize > {
207
207
self . pin_mut ( ) . read_to_string ( buf)
208
208
}
209
209
210
210
#[ inline]
211
- fn read_exact ( & mut self , buf : & mut [ u8 ] ) -> std :: io:: Result < ( ) > {
211
+ fn read_exact ( & mut self , buf : & mut [ u8 ] ) -> io:: Result < ( ) > {
212
212
self . pin_mut ( ) . read_exact ( buf)
213
213
}
214
214
0 commit comments