aboutsummaryrefslogtreecommitdiff
path: root/bin/src/config.rs
diff options
context:
space:
mode:
Diffstat (limited to 'bin/src/config.rs')
-rw-r--r--bin/src/config.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/bin/src/config.rs b/bin/src/config.rs
index 1649017..46bf60f 100644
--- a/bin/src/config.rs
+++ b/bin/src/config.rs
@@ -154,7 +154,7 @@ mod dirs {
154} 154}
155 155
156fn parse_line_col(src: &str) -> Result<(usize, usize), ConfigErr> { 156fn parse_line_col(src: &str) -> Result<(usize, usize), ConfigErr> {
157 let parts = src.split(","); 157 let parts = src.split(',');
158 match parts.collect::<Vec<_>>().as_slice() { 158 match parts.collect::<Vec<_>>().as_slice() {
159 [line, col] => { 159 [line, col] => {
160 let l = line 160 let l = line
@@ -173,7 +173,7 @@ fn parse_warning_code(src: &str) -> Result<u32, ConfigErr> {
173 let mut char_stream = src.chars(); 173 let mut char_stream = src.chars();
174 let severity = char_stream 174 let severity = char_stream
175 .next() 175 .next()
176 .ok_or(ConfigErr::InvalidWarningCode(src.to_owned()))? 176 .ok_or_else(|| ConfigErr::InvalidWarningCode(src.to_owned()))?
177 .to_ascii_lowercase(); 177 .to_ascii_lowercase();
178 match severity { 178 match severity {
179 'w' => char_stream 179 'w' => char_stream
@@ -187,7 +187,7 @@ fn parse_warning_code(src: &str) -> Result<u32, ConfigErr> {
187fn build_ignore_set(ignores: &[String]) -> Result<GlobSet, GlobError> { 187fn build_ignore_set(ignores: &[String]) -> Result<GlobSet, GlobError> {
188 let mut set = GlobSetBuilder::new(); 188 let mut set = GlobSetBuilder::new();
189 for pattern in ignores { 189 for pattern in ignores {
190 let glob = GlobBuilder::new(&pattern).build()?; 190 let glob = GlobBuilder::new(pattern).build()?;
191 set.add(glob); 191 set.add(glob);
192 } 192 }
193 set.build() 193 set.build()