File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -348,9 +348,9 @@ fn create_word_set(
348348 file_map : & FileMap ,
349349) -> UResult < BTreeSet < WordRef > > {
350350 let reg = Regex :: new ( & filter. word_regex )
351- . map_err ( |e| USimpleError :: new ( 1 , format ! ( "invalid regular expression: {}" , e) ) ) ?;
351+ . map_err ( |e| USimpleError :: new ( 1 , translate ! ( "ptx-error- invalid-regexp" , "error" => e) ) ) ?;
352352 let ref_reg = Regex :: new ( & config. context_regex )
353- . map_err ( |e| USimpleError :: new ( 1 , format ! ( "invalid regular expression: {}" , e) ) ) ?;
353+ . map_err ( |e| USimpleError :: new ( 1 , translate ! ( "ptx-error- invalid-regexp" , "error" => e) ) ) ?;
354354 let mut word_set: BTreeSet < WordRef > = BTreeSet :: new ( ) ;
355355 for ( file, lines) in file_map {
356356 let mut count: usize = 0 ;
Original file line number Diff line number Diff line change @@ -353,4 +353,4 @@ fn test_invalid_regex_word_unclosed_group() {
353353 . args ( & [ "-W" , "(wrong" ] )
354354 . fails_with_code ( 1 )
355355 . stderr_contains ( "ptx: invalid regular expression" ) ;
356- }
356+ }
You can’t perform that action at this time.
0 commit comments