From ed6595543b4034cb295761e1a6fb2c49762d554f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Kr=C3=BCger?= Date: Thu, 30 Nov 2017 00:15:49 +0100 Subject: [PATCH] clippy: use is_empty() instead of len() == 0 (warn(len_zero)). --- src/config.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); }