File tree Expand file tree Collapse file tree
hexora_semantic/src/strings Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -92,7 +92,7 @@ pub fn annotate_result(
9292 ] )
9393 . with_note ( {
9494 let mut note = String :: new ( ) ;
95- note. push_str ( format ! ( "Confidence: {:?}\n " , & item. confidence) . as_str ( ) ) ;
95+ note. push_str ( format ! ( "Confidence: {:?}\n " , item. confidence) . as_str ( ) ) ;
9696 note. push_str (
9797 format ! ( "Machine learning based score for file: {:.2}\n " , score) . as_str ( ) ,
9898 ) ;
Original file line number Diff line number Diff line change @@ -5,3 +5,4 @@ const CLI_START_ARG_STANDALONE: usize = 0;
55fn main ( ) {
66 run_cli ( CLI_START_ARG_STANDALONE ) ;
77}
8+
Original file line number Diff line number Diff line change @@ -69,11 +69,9 @@ impl<'a> NodeTransformer<'a> {
6969
7070 let mut resolved = String :: new ( ) ;
7171 for mapped in resolved_exprs. iter ( ) {
72- if let Some ( s) = self . extract_string ( mapped) {
72+ {
73+ let s = self . extract_string ( mapped) ?;
7374 resolved. push_str ( & s) ;
74- } else {
75- // N.B.: We currently abort if any part cannot be resolved to a string.
76- return None ;
7775 }
7876 }
7977 Some ( resolved)
@@ -119,10 +117,9 @@ impl<'a> NodeTransformer<'a> {
119117 }
120118
121119 if let ast:: Expr :: Call ( inner_call) = expr {
122- if let Some ( arg) = self . call_is_simple_reversed ( inner_call) {
120+ {
121+ let arg = self . call_is_simple_reversed ( inner_call) ?;
123122 return self . sequence_to_parts ( arg, !reverse) ;
124- } else {
125- return None ;
126123 }
127124 }
128125
You can’t perform that action at this time.
0 commit comments