Add links to other walkdir items in WalkDir docs

Fixes #29
This commit is contained in:
Alisha Aneja 2017-07-01 23:05:06 +10:00 committed by Andrew Gallant
parent 938b0fa064
commit c55dc9f4d5

View File

@ -162,7 +162,7 @@ pub type Result<T> = ::std::result::Result<T, Error>;
///
/// This type implements `IntoIterator` so that it may be used as the subject
/// of a `for` loop. You may need to call `into_iter` explicitly if you want
/// to use iterator adapters such as `filter_entry`.
/// to use iterator adapters such as [`filter_entry`].
///
/// Idiomatic use of this type should use method chaining to set desired
/// options. For example, this only shows entries with a depth of `1`, `2`
@ -184,9 +184,11 @@ pub type Result<T> = ::std::result::Result<T, Error>;
/// # }
/// ```
///
/// [`filter_entry`]: struct.IntoIter.html#method.filter_entry
///
/// Note that the iterator by default includes the top-most directory. Since
/// this is the only directory yielded with depth `0`, it is easy to ignore it
/// with the `min_depth` setting:
/// with the [`min_depth`] setting:
///
/// ```rust,no_run
/// use walkdir::WalkDir;
@ -204,6 +206,8 @@ pub type Result<T> = ::std::result::Result<T, Error>;
/// # }
/// ```
///
/// [`min_depth`]: struct.WalkDir.html#method.min_depth
///
/// This will only return descendents of the `foo` directory and not `foo`
/// itself.
///