diff options
| author | Steven Fackler <sfackler@gmail.com> | 2020-03-11 18:02:52 -0700 |
|---|---|---|
| committer | Steven Fackler <sfackler@gmail.com> | 2020-04-26 04:24:16 -0700 |
| commit | 07443f17d4c2e8135d1cbf415f6bd22eee86b64a (patch) | |
| tree | 1fc883588b4098f527849ab69f4fa8fef23b55cb /src/libstd/io | |
| parent | 15262ec6be6fcfc9f27e174a0714d5a62e775fb0 (diff) | |
| download | rust-07443f17d4c2e8135d1cbf415f6bd22eee86b64a.tar.gz rust-07443f17d4c2e8135d1cbf415f6bd22eee86b64a.zip | |
Update name
Diffstat (limited to 'src/libstd/io')
| -rw-r--r-- | src/libstd/io/buffered.rs | 8 | ||||
| -rw-r--r-- | src/libstd/io/cursor.rs | 10 | ||||
| -rw-r--r-- | src/libstd/io/impls.rs | 22 | ||||
| -rw-r--r-- | src/libstd/io/mod.rs | 8 | ||||
| -rw-r--r-- | src/libstd/io/stdio.rs | 44 | ||||
| -rw-r--r-- | src/libstd/io/util.rs | 4 |
6 files changed, 48 insertions, 48 deletions
diff --git a/src/libstd/io/buffered.rs b/src/libstd/io/buffered.rs index cabeaf4ae77..046b1a68880 100644 --- a/src/libstd/io/buffered.rs +++ b/src/libstd/io/buffered.rs @@ -292,8 +292,8 @@ impl<R: Read> Read for BufReader<R> { Ok(nread) } - fn can_read_vectored(&self) -> bool { - self.inner.can_read_vectored() + fn is_read_vectored(&self) -> bool { + self.inner.is_read_vectored() } // we can't skip unconditionally because of the large buffer case in read. @@ -684,8 +684,8 @@ impl<W: Write> Write for BufWriter<W> { } } - fn can_write_vectored(&self) -> bool { - self.get_ref().can_write_vectored() + fn is_write_vectored(&self) -> bool { + self.get_ref().is_write_vectored() } fn flush(&mut self) -> io::Result<()> { diff --git a/src/libstd/io/cursor.rs b/src/libstd/io/cursor.rs index 859431ea0ef..f3e3fc81a5d 100644 --- a/src/libstd/io/cursor.rs +++ b/src/libstd/io/cursor.rs @@ -266,7 +266,7 @@ where Ok(nread) } - fn can_read_vectored(&self) -> bool { + fn is_read_vectored(&self) -> bool { true } @@ -377,7 +377,7 @@ impl Write for Cursor<&mut [u8]> { } #[inline] - fn can_write_vectored(&self) -> bool { + fn is_write_vectored(&self) -> bool { true } @@ -398,7 +398,7 @@ impl Write for Cursor<&mut Vec<u8>> { } #[inline] - fn can_write_vectored(&self) -> bool { + fn is_write_vectored(&self) -> bool { true } @@ -419,7 +419,7 @@ impl Write for Cursor<Vec<u8>> { } #[inline] - fn can_write_vectored(&self) -> bool { + fn is_write_vectored(&self) -> bool { true } @@ -442,7 +442,7 @@ impl Write for Cursor<Box<[u8]>> { } #[inline] - fn can_write_vectored(&self) -> bool { + fn is_write_vectored(&self) -> bool { true } diff --git a/src/libstd/io/impls.rs b/src/libstd/io/impls.rs index 1fb9f12dd90..01dff0b3eb3 100644 --- a/src/libstd/io/impls.rs +++ b/src/libstd/io/impls.rs @@ -21,8 +21,8 @@ impl<R: Read + ?Sized> Read for &mut R { } #[inline] - fn can_read_vectored(&self) -> bool { - (**self).can_read_vectored() + fn is_read_vectored(&self) -> bool { + (**self).is_read_vectored() } #[inline] @@ -58,8 +58,8 @@ impl<W: Write + ?Sized> Write for &mut W { } #[inline] - fn can_write_vectored(&self) -> bool { - (**self).can_write_vectored() + fn is_write_vectored(&self) -> bool { + (**self).is_write_vectored() } #[inline] @@ -120,8 +120,8 @@ impl<R: Read + ?Sized> Read for Box<R> { } #[inline] - fn can_read_vectored(&self) -> bool { - (**self).can_read_vectored() + fn is_read_vectored(&self) -> bool { + (**self).is_read_vectored() } #[inline] @@ -157,8 +157,8 @@ impl<W: Write + ?Sized> Write for Box<W> { } #[inline] - fn can_write_vectored(&self) -> bool { - (**self).can_write_vectored() + fn is_write_vectored(&self) -> bool { + (**self).is_write_vectored() } #[inline] @@ -261,7 +261,7 @@ impl Read for &[u8] { } #[inline] - fn can_read_vectored(&self) -> bool { + fn is_read_vectored(&self) -> bool { true } @@ -342,7 +342,7 @@ impl Write for &mut [u8] { } #[inline] - fn can_write_vectored(&self) -> bool { + fn is_write_vectored(&self) -> bool { true } @@ -382,7 +382,7 @@ impl Write for Vec<u8> { } #[inline] - fn can_write_vectored(&self) -> bool { + fn is_write_vectored(&self) -> bool { true } diff --git a/src/libstd/io/mod.rs b/src/libstd/io/mod.rs index c6229fb39e0..c9db48db9bd 100644 --- a/src/libstd/io/mod.rs +++ b/src/libstd/io/mod.rs @@ -588,8 +588,8 @@ pub trait Read { /// and coalesce writes into a single buffer for higher performance. /// /// The default implementation returns `false`. - #[unstable(feature = "can_vector", issue = "none")] - fn can_read_vectored(&self) -> bool { + #[unstable(feature = "can_vector", issue = "69941")] + fn is_read_vectored(&self) -> bool { false } @@ -1325,8 +1325,8 @@ pub trait Write { /// and coalesce writes into a single buffer for higher performance. /// /// The default implementation returns `false`. - #[unstable(feature = "can_vector", issue = "none")] - fn can_write_vectored(&self) -> bool { + #[unstable(feature = "can_vector", issue = "69941")] + fn is_write_vectored(&self) -> bool { false } diff --git a/src/libstd/io/stdio.rs b/src/libstd/io/stdio.rs index fd5a1291785..b65b150d2c3 100644 --- a/src/libstd/io/stdio.rs +++ b/src/libstd/io/stdio.rs @@ -88,8 +88,8 @@ impl Read for StdinRaw { } #[inline] - fn can_read_vectored(&self) -> bool { - self.0.can_read_vectored() + fn is_read_vectored(&self) -> bool { + self.0.is_read_vectored() } #[inline] @@ -107,8 +107,8 @@ impl Write for StdoutRaw { } #[inline] - fn can_write_vectored(&self) -> bool { - self.0.can_write_vectored() + fn is_write_vectored(&self) -> bool { + self.0.is_write_vectored() } fn flush(&mut self) -> io::Result<()> { @@ -125,8 +125,8 @@ impl Write for StderrRaw { } #[inline] - fn can_write_vectored(&self) -> bool { - self.0.can_write_vectored() + fn is_write_vectored(&self) -> bool { + self.0.is_write_vectored() } fn flush(&mut self) -> io::Result<()> { @@ -156,9 +156,9 @@ impl<W: io::Write> io::Write for Maybe<W> { } #[inline] - fn can_write_vectored(&self) -> bool { + fn is_write_vectored(&self) -> bool { match self { - Maybe::Real(w) => w.can_write_vectored(), + Maybe::Real(w) => w.is_write_vectored(), Maybe::Fake => true, } } @@ -187,9 +187,9 @@ impl<R: io::Read> io::Read for Maybe<R> { } #[inline] - fn can_read_vectored(&self) -> bool { + fn is_read_vectored(&self) -> bool { match self { - Maybe::Real(w) => w.can_read_vectored(), + Maybe::Real(w) => w.is_read_vectored(), Maybe::Fake => true, } } @@ -383,8 +383,8 @@ impl Read for Stdin { self.lock().read_vectored(bufs) } #[inline] - fn can_read_vectored(&self) -> bool { - self.lock().can_read_vectored() + fn is_read_vectored(&self) -> bool { + self.lock().is_read_vectored() } #[inline] unsafe fn initializer(&self) -> Initializer { @@ -412,8 +412,8 @@ impl Read for StdinLock<'_> { } #[inline] - fn can_read_vectored(&self) -> bool { - self.inner.can_read_vectored() + fn is_read_vectored(&self) -> bool { + self.inner.is_read_vectored() } #[inline] @@ -584,8 +584,8 @@ impl Write for Stdout { self.lock().write_vectored(bufs) } #[inline] - fn can_write_vectored(&self) -> bool { - self.lock().can_write_vectored() + fn is_write_vectored(&self) -> bool { + self.lock().is_write_vectored() } fn flush(&mut self) -> io::Result<()> { self.lock().flush() @@ -606,8 +606,8 @@ impl Write for StdoutLock<'_> { self.inner.borrow_mut().write_vectored(bufs) } #[inline] - fn can_write_vectored(&self) -> bool { - self.inner.borrow_mut().can_write_vectored() + fn is_write_vectored(&self) -> bool { + self.inner.borrow_mut().is_write_vectored() } fn flush(&mut self) -> io::Result<()> { self.inner.borrow_mut().flush() @@ -758,8 +758,8 @@ impl Write for Stderr { self.lock().write_vectored(bufs) } #[inline] - fn can_write_vectored(&self) -> bool { - self.lock().can_write_vectored() + fn is_write_vectored(&self) -> bool { + self.lock().is_write_vectored() } fn flush(&mut self) -> io::Result<()> { self.lock().flush() @@ -780,8 +780,8 @@ impl Write for StderrLock<'_> { self.inner.borrow_mut().write_vectored(bufs) } #[inline] - fn can_write_vectored(&self) -> bool { - self.inner.borrow_mut().can_write_vectored() + fn is_write_vectored(&self) -> bool { + self.inner.borrow_mut().is_write_vectored() } fn flush(&mut self) -> io::Result<()> { self.inner.borrow_mut().flush() diff --git a/src/libstd/io/util.rs b/src/libstd/io/util.rs index 01947cd8b89..b9d5dc27db0 100644 --- a/src/libstd/io/util.rs +++ b/src/libstd/io/util.rs @@ -180,7 +180,7 @@ impl Read for Repeat { } #[inline] - fn can_read_vectored(&self) -> bool { + fn is_read_vectored(&self) -> bool { true } @@ -241,7 +241,7 @@ impl Write for Sink { } #[inline] - fn can_write_vectored(&self) -> bool { + fn is_write_vectored(&self) -> bool { true } |
