mirror of
https://github.com/jht5945/finding.git
synced 2025-12-27 13:20:03 +08:00
ref parts
This commit is contained in:
@@ -113,8 +113,8 @@ fn match_lines(tag: &str, content: &str, options: &Options) -> bool {
|
|||||||
if options.ignore_case {
|
if options.ignore_case {
|
||||||
println!("{}", match_line.line_string);
|
println!("{}", match_line.line_string);
|
||||||
} else {
|
} else {
|
||||||
let ss: Vec<&str> = match_line.line_string.split(search_text).collect();
|
let parts = match_line.line_string.split(search_text).collect::<Vec<_>>();
|
||||||
for (j, part) in ss.iter().enumerate() {
|
for (j, part) in parts.iter().enumerate() {
|
||||||
if j != 0 {
|
if j != 0 {
|
||||||
print_color(Some(term::color::RED), true, search_text);
|
print_color(Some(term::color::RED), true, search_text);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user