diff options
| author | Matt Brubeck <mbrubeck@limpet.net> | 2018-04-02 09:11:07 -0700 |
|---|---|---|
| committer | Matt Brubeck <mbrubeck@limpet.net> | 2018-04-03 15:25:55 -0700 |
| commit | 1ce98f34d38fa9338ff696f904bcb8c01856f935 (patch) | |
| tree | bfea0bbeb672cc162d20af3247c3557c783fffeb /src/libstd/io | |
| parent | 85310860c25c8525c03b2ffe12674c1914917aa0 (diff) | |
| download | rust-1ce98f34d38fa9338ff696f904bcb8c01856f935.tar.gz rust-1ce98f34d38fa9338ff696f904bcb8c01856f935.zip | |
Cross-reference fs::read functions from io::Read docs
Diffstat (limited to 'src/libstd/io')
| -rw-r--r-- | src/libstd/io/mod.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/libstd/io/mod.rs b/src/libstd/io/mod.rs index 63b631ace96..3b8c42ddb39 100644 --- a/src/libstd/io/mod.rs +++ b/src/libstd/io/mod.rs @@ -595,6 +595,11 @@ pub trait Read { /// Ok(()) /// } /// ``` + /// + /// (See also the [`std::fs::read`] convenience function for reading from a + /// file.) + /// + /// [`std::fs::read`]: ../fs/fn.read.html #[stable(feature = "rust1", since = "1.0.0")] fn read_to_end(&mut self, buf: &mut Vec<u8>) -> Result<usize> { read_to_end(self, buf) @@ -633,6 +638,11 @@ pub trait Read { /// Ok(()) /// } /// ``` + /// + /// (See also the [`std::fs::read_to_string`] convenience function for + /// reading from a file.) + /// + /// [`std::fs::read_to_string`]: ../fs/fn.read_to_string.html #[stable(feature = "rust1", since = "1.0.0")] fn read_to_string(&mut self, buf: &mut String) -> Result<usize> { // Note that we do *not* call `.read_to_end()` here. We are passing |
