Skip to content

Commit

Permalink
cli: Clean buffer if checking multiple templates at once
Browse files Browse the repository at this point in the history
  • Loading branch information
tailhook committed Aug 4, 2017
1 parent 7f5b47a commit 7175b3b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/bin/trimmer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ fn main() {
Scanning directories is not iplemented.", path);
code = 1;
}
buf.truncate(0);
let read = File::open(path)
.and_then(|mut f| f.read_to_string(&mut buf));
match read {
Expand Down

0 comments on commit 7175b3b

Please sign in to comment.