diff options
| author | Teddy Wing | 2016-04-19 18:54:54 -0400 |
|---|---|---|
| committer | Teddy Wing | 2016-04-19 18:54:54 -0400 |
| commit | 7bb222bd93959ae39e8c73605f13c6413c878f3c (patch) | |
| tree | 930f43ddb60de7e66a652245a2b5d3b0994e3b02 | |
| parent | 584efd5762122281ae0587365c54486f1daa0219 (diff) | |
| download | mutt-alias-auto-add-7bb222bd93959ae39e8c73605f13c6413c878f3c.tar.bz2 | |
is_alias_in_file: Make `file` binding immutable
Got a compiler warning saying that this doesn't need to be mutable.
Sounds good to me, so let's do what it recommends.
| -rw-r--r-- | src/main.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs index 30f6f30..79e3411 100644 --- a/src/main.rs +++ b/src/main.rs @@ -83,7 +83,7 @@ fn build_alias(s: &str) -> String { fn is_alias_in_file(alias: &Alias, file: &str) -> Result<(), io::Error> { let f = try!(File::open(file)); - let mut file = BufReader::new(&f); + let file = BufReader::new(&f); for line in file.lines() { let line = line.unwrap(); let split: Vec<&str> = line.split_whitespace().collect(); |
