Skip to content

Commit c54a272

Browse files
committed
Cross-reference fs::read functions from io::Read docs
1 parent 8531086 commit c54a272

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/libstd/io/mod.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -595,6 +595,9 @@ pub trait Read {
595595
/// Ok(())
596596
/// }
597597
/// ```
598+
///
599+
/// (See also the [`std::fs::read`] convenience function for reading from a
600+
/// file.)
598601
#[stable(feature = "rust1", since = "1.0.0")]
599602
fn read_to_end(&mut self, buf: &mut Vec<u8>) -> Result<usize> {
600603
read_to_end(self, buf)
@@ -633,6 +636,9 @@ pub trait Read {
633636
/// Ok(())
634637
/// }
635638
/// ```
639+
///
640+
/// (See also the [`std::fs::read_to_string`] convenience function for
641+
/// reading from a file.)
636642
#[stable(feature = "rust1", since = "1.0.0")]
637643
fn read_to_string(&mut self, buf: &mut String) -> Result<usize> {
638644
// Note that we do *not* call `.read_to_end()` here. We are passing

0 commit comments

Comments
 (0)