mirror of
https://github.com/BurntSushi/walkdir.git
synced 2025-10-02 08:00:30 +00:00
parent
938b0fa064
commit
c55dc9f4d5
@ -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.
|
||||
///
|
||||
|
Loading…
x
Reference in New Issue
Block a user