From 03bbba3193596415e65efd83db44ceba7fa27db2 Mon Sep 17 00:00:00 2001 From: Hatter Jiang Date: Tue, 28 Apr 2020 00:40:43 +0800 Subject: [PATCH] l_no -> line_no --- src/main.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main.rs b/src/main.rs index 5fa6640..3ccb0ec 100644 --- a/src/main.rs +++ b/src/main.rs @@ -92,7 +92,7 @@ fn match_lines(tag: &str, content: &str, options: &Options) -> bool { let search_text = &options.search_text; let lines = content.lines(); let mut match_lines_vec = vec![]; - let mut l_no = 0usize; + let mut line_no = 0usize; let the_search_text = &iff!(options.ignore_case, search_text.to_lowercase(), search_text.to_string()); for ln in lines { if options.filter_large_line && ln.len() as u64 >= options.parsed_large_line_size { @@ -107,9 +107,9 @@ fn match_lines(tag: &str, content: &str, options: &Options) -> bool { c => ln.contains(c), }; if matches && matches_line_content { - match_lines_vec.push(MatchLine::new(l_no, ln.to_string())); + match_lines_vec.push(MatchLine::new(line_no, ln.to_string())); } - l_no += 1; + line_no += 1; } if match_lines_vec.is_empty() {