diff options
author | Matthias Krüger <matthias.krueger@famsik.de> | 2017-11-30 00:15:49 +0100 |
---|---|---|
committer | Joe Wilm <jwilm@users.noreply.github.com> | 2017-12-03 12:50:40 -0800 |
commit | ed6595543b4034cb295761e1a6fb2c49762d554f (patch) | |
tree | 72e0111ec2dea2ae0fb1fe6b21d3e13f2fa82f62 | |
parent | ffac0f5840981ee5b32e25541f7931a7792180d6 (diff) | |
download | alacritty-ed6595543b4034cb295761e1a6fb2c49762d554f.tar.gz alacritty-ed6595543b4034cb295761e1a6fb2c49762d554f.zip |
clippy: use is_empty() instead of len() == 0 (warn(len_zero)).
-rw-r--r-- | src/config.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/config.rs b/src/config.rs index c48063d3..36ac3319 100644 --- a/src/config.rs +++ b/src/config.rs @@ -1198,7 +1198,7 @@ impl Config { let mut f = fs::File::open(path)?; let mut contents = String::new(); f.read_to_string(&mut contents)?; - if contents.len() == 0 { + if contents.is_empty() { return Err(Error::Empty); } |