diff options
Diffstat (limited to 'src/librustpkg/source_control.rs')
| -rw-r--r-- | src/librustpkg/source_control.rs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/librustpkg/source_control.rs b/src/librustpkg/source_control.rs index a0e50ff0f9e..e5d1c9b597f 100644 --- a/src/librustpkg/source_control.rs +++ b/src/librustpkg/source_control.rs @@ -96,12 +96,11 @@ pub enum CloneResult { pub fn make_read_only(target: &Path) { // Now, make all the files in the target dir read-only - do file::walk_dir(target) |p| { + for p in file::walk_dir(target) { if !p.is_dir() { - assert!(chmod_read_only(p)); - }; - true - }; + assert!(chmod_read_only(&p)); + } + } } /// Source can be either a URL or a local file path. |
