diff options
author | opilarium <opilar@ya.ru> | 2017-09-24 22:31:09 +0300 |
---|---|---|
committer | Andrew Gallant <jamslam@gmail.com> | 2017-09-30 15:22:58 +0300 |
commit | 5be43be8643003ea4443696f76f8021469cfeb2a (patch) | |
tree | 4865f264b7fe0f2eb18f731a26c85c1d6f9fd499 /README.md | |
parent | f1f9a35f29a8ed0430e7aaaa933fba0d744c9b8e (diff) |
Revert changes in README
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -30,7 +30,7 @@ walkdir = "1" The following code recursively iterates over the directory given and prints the path for each entry: -```no_run +```rust,no_run use walkdir::WalkDir; for entry in WalkDir::new("foo") { @@ -43,7 +43,7 @@ Or, if you'd like to iterate over all entries and ignore any errors that may arise, use `filter_map`. (e.g., This code below will silently skip directories that the owner of the running process does not have permission to access.) -```no_run +```rust,no_run use walkdir::WalkDir; for entry in WalkDir::new("foo").into_iter().filter_map(|e| e.ok()) { @@ -55,7 +55,7 @@ for entry in WalkDir::new("foo").into_iter().filter_map(|e| e.ok()) { The same code as above, except `follow_links` is enabled: -```no_run +```rust,no_run use walkdir::WalkDir; for entry in WalkDir::new("foo").follow_links(true) { @@ -69,7 +69,7 @@ for entry in WalkDir::new("foo").follow_links(true) { This uses the `filter_entry` iterator adapter to avoid yielding hidden files and directories efficiently: -```no_run +```rust,no_run use walkdir::{DirEntry, WalkDir}; fn is_hidden(entry: &DirEntry) -> bool { |