Skip to content

Commit e9f6c71

Browse files
committed
Touch up PR 1368
1 parent 6afd5ac commit e9f6c71

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/unique_ptr.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,8 @@ use core::marker::PhantomData;
99
use core::mem::{self, MaybeUninit};
1010
use core::ops::{Deref, DerefMut};
1111
use core::pin::Pin;
12-
1312
#[cfg(feature = "std")]
14-
use std::io::Read;
13+
use std::io::{self, Read};
1514

1615
/// Binding to C++ `std::unique_ptr<T, std::default_delete<T>>`.
1716
#[repr(C)]
@@ -184,31 +183,32 @@ where
184183
}
185184
}
186185

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>`.
189189
#[cfg(feature = "std")]
190190
impl<T> Read for UniquePtr<T>
191191
where
192192
for<'a> Pin<&'a mut T>: Read,
193193
T: UniquePtrTarget,
194194
{
195195
#[inline]
196-
fn read(&mut self, buf: &mut [u8]) -> std::io::Result<usize> {
196+
fn read(&mut self, buf: &mut [u8]) -> io::Result<usize> {
197197
self.pin_mut().read(buf)
198198
}
199199

200200
#[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> {
202202
self.pin_mut().read_to_end(buf)
203203
}
204204

205205
#[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> {
207207
self.pin_mut().read_to_string(buf)
208208
}
209209

210210
#[inline]
211-
fn read_exact(&mut self, buf: &mut [u8]) -> std::io::Result<()> {
211+
fn read_exact(&mut self, buf: &mut [u8]) -> io::Result<()> {
212212
self.pin_mut().read_exact(buf)
213213
}
214214

0 commit comments

Comments
 (0)