clippy: use is_empty() instead of len() == 0 (warn(len_zero)).

This commit is contained in:
Matthias Krüger 2017-11-30 00:15:49 +01:00 committed by Joe Wilm
parent ffac0f5840
commit ed6595543b
1 changed files with 1 additions and 1 deletions

View File

@ -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);
}