use is_empty() to check for empty string

This commit is contained in:
Dietmar Maurer 2018-11-26 18:02:29 +01:00
parent dd193a61d0
commit 0d97734e92
1 changed files with 1 additions and 1 deletions

View File

@ -78,7 +78,7 @@ impl SectionConfig {
pub fn default_parse_section_header(line: &str) -> Option<(String, String)> { pub fn default_parse_section_header(line: &str) -> Option<(String, String)> {
if line.len() == 0 { return None; }; if line.is_empty() { return None; };
let first_char = line.chars().next().unwrap(); let first_char = line.chars().next().unwrap();