Evaluate # fn in docs
I searched for times when we were hiding functions with # in the documentation, and fixed them to not use it unless neccesary. I also made random improvements whenever I changed something. For example, I changed Example to Examples, for consistency. Fixes #13423
This commit is contained in:
@@ -934,16 +934,15 @@ unsafe fn slice_vec_capacity<'a, T>(v: &'a mut Vec<T>, start: uint, end: uint) -
|
||||
/// A `RefReader` is a struct implementing `Reader` which contains a reference
|
||||
/// to another reader. This is often useful when composing streams.
|
||||
///
|
||||
/// # Example
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
/// # fn main() {}
|
||||
/// # fn process_input<R: Reader>(r: R) {}
|
||||
/// # fn foo() {
|
||||
/// use std::io;
|
||||
/// use std::io::ByRefReader;
|
||||
/// use std::io::util::LimitReader;
|
||||
///
|
||||
/// fn process_input<R: Reader>(r: R) {}
|
||||
///
|
||||
/// let mut stream = io::stdin();
|
||||
///
|
||||
/// // Only allow the function to process at most one kilobyte of input
|
||||
@@ -953,8 +952,6 @@ unsafe fn slice_vec_capacity<'a, T>(v: &'a mut Vec<T>, start: uint, end: uint) -
|
||||
/// }
|
||||
///
|
||||
/// // 'stream' is still available for use here
|
||||
///
|
||||
/// # }
|
||||
/// ```
|
||||
pub struct RefReader<'a, R:'a> {
|
||||
/// The underlying reader which this is referencing
|
||||
@@ -1269,12 +1266,11 @@ impl<'a> Writer for &'a mut (Writer+'a) {
|
||||
/// # Example
|
||||
///
|
||||
/// ```
|
||||
/// # fn main() {}
|
||||
/// # fn process_input<R: Reader>(r: R) {}
|
||||
/// # fn foo () {
|
||||
/// use std::io::util::TeeReader;
|
||||
/// use std::io::{stdin, ByRefWriter};
|
||||
///
|
||||
/// fn process_input<R: Reader>(r: R) {}
|
||||
///
|
||||
/// let mut output = Vec::new();
|
||||
///
|
||||
/// {
|
||||
@@ -1285,7 +1281,6 @@ impl<'a> Writer for &'a mut (Writer+'a) {
|
||||
/// }
|
||||
///
|
||||
/// println!("input processed: {:?}", output);
|
||||
/// # }
|
||||
/// ```
|
||||
pub struct RefWriter<'a, W:'a> {
|
||||
/// The underlying writer which this is referencing
|
||||
@@ -1705,19 +1700,19 @@ pub enum FileType {
|
||||
/// A structure used to describe metadata information about a file. This
|
||||
/// structure is created through the `stat` method on a `Path`.
|
||||
///
|
||||
/// # Example
|
||||
/// # Examples
|
||||
///
|
||||
/// ```no_run
|
||||
/// # #![allow(unstable)]
|
||||
///
|
||||
/// use std::io::fs::PathExtensions;
|
||||
///
|
||||
/// ```
|
||||
/// # use std::io::fs::PathExtensions;
|
||||
/// # fn main() {}
|
||||
/// # fn foo() {
|
||||
/// let info = match Path::new("foo.txt").stat() {
|
||||
/// Ok(stat) => stat,
|
||||
/// Err(e) => panic!("couldn't read foo.txt: {}", e),
|
||||
/// };
|
||||
///
|
||||
/// println!("byte size: {}", info.size);
|
||||
/// # }
|
||||
/// ```
|
||||
#[derive(Copy, Hash)]
|
||||
pub struct FileStat {
|
||||
|
||||
Reference in New Issue
Block a user