@@ -73,25 +73,20 @@ fn parse_args() -> Result<Args, String> {
7373 }
7474 "-C" | "--context" => {
7575 i += 1 ;
76- let n =
77- parse_num ( raw. get ( i) . ok_or ( "--context requires a count" ) ?) ?;
76+ let n = parse_num ( raw. get ( i) . ok_or ( "--context requires a count" ) ?) ?;
7877 args. context_before = n;
7978 args. context_after = n;
8079 i += 1 ;
8180 }
8281 "-A" | "--after-context" => {
8382 i += 1 ;
84- let n = parse_num (
85- raw. get ( i) . ok_or ( "--after-context requires a count" ) ?,
86- ) ?;
83+ let n = parse_num ( raw. get ( i) . ok_or ( "--after-context requires a count" ) ?) ?;
8784 args. context_after = n;
8885 i += 1 ;
8986 }
9087 "-B" | "--before-context" => {
9188 i += 1 ;
92- let n = parse_num (
93- raw. get ( i) . ok_or ( "--before-context requires a count" ) ?,
94- ) ?;
89+ let n = parse_num ( raw. get ( i) . ok_or ( "--before-context requires a count" ) ?) ?;
9590 args. context_before = n;
9691 i += 1 ;
9792 }
@@ -196,14 +191,14 @@ fn main() {
196191 // Helper: process a logical record (text spanning [start..physical_line])
197192 // through the engine and queue resulting matches.
198193 let process_record = |raw : & str ,
199- start_line : u64 ,
200- end_line : u64 ,
201- detected_format : & mut Option < format:: Format > ,
202- eng : & mut engine:: Engine ,
203- total_events : & mut u64 ,
204- total_matches : & mut u64 ,
205- pending : & mut Vec < PendingMatch > ,
206- stdout : & mut io:: StdoutLock |
194+ start_line : u64 ,
195+ end_line : u64 ,
196+ detected_format : & mut Option < format:: Format > ,
197+ eng : & mut engine:: Engine ,
198+ total_events : & mut u64 ,
199+ total_matches : & mut u64 ,
200+ pending : & mut Vec < PendingMatch > ,
201+ stdout : & mut io:: StdoutLock |
207202 -> io:: Result < ( ) > {
208203 let trimmed = raw. trim_end ( ) ;
209204 if trimmed. is_empty ( ) || trimmed. starts_with ( '#' ) || trimmed. starts_with ( "//" ) {
0 commit comments