@@ -116,7 +116,9 @@ pub async fn execute_search(
116116 } ,
117117 None => set. join_next ( ) . await ,
118118 } ;
119- let Some ( join_result) = join_result else { break } ;
119+ let Some ( join_result) = join_result else {
120+ break ;
121+ } ;
120122 match join_result {
121123 Ok ( ( name, Ok ( Ok ( items) ) ) ) => {
122124 for item in & items {
@@ -254,10 +256,7 @@ fn fuse_rrf(buckets: Vec<(String, Vec<SearchResult>)>) -> Vec<SearchResult> {
254256 if f. result . image_url . is_none ( ) {
255257 f. result . image_url = item. image_url ;
256258 }
257- let extra = f
258- . result
259- . extra
260- . get_or_insert_with ( || serde_json:: json!( { } ) ) ;
259+ let extra = f. result . extra . get_or_insert_with ( || serde_json:: json!( { } ) ) ;
261260 if let Some ( obj) = extra. as_object_mut ( ) {
262261 let list = obj
263262 . entry ( "also_found_by" )
@@ -623,11 +622,17 @@ mod tests {
623622 let buckets = vec ! [
624623 (
625624 "a" . to_string( ) ,
626- vec![ result( "https://only-a.com" , "a" ) , result( "https://both.com" , "a" ) ] ,
625+ vec![
626+ result( "https://only-a.com" , "a" ) ,
627+ result( "https://both.com" , "a" ) ,
628+ ] ,
627629 ) ,
628630 (
629631 "b" . to_string( ) ,
630- vec![ result( "https://only-b.com" , "b" ) , result( "https://both.com" , "b" ) ] ,
632+ vec![
633+ result( "https://only-b.com" , "b" ) ,
634+ result( "https://both.com" , "b" ) ,
635+ ] ,
631636 ) ,
632637 ] ;
633638 let fused = fuse_rrf ( buckets) ;
@@ -641,11 +646,17 @@ mod tests {
641646 vec ! [
642647 (
643648 first. to_string( ) ,
644- vec![ result( "https://x.com" , first) , result( "https://y.com" , first) ] ,
649+ vec![
650+ result( "https://x.com" , first) ,
651+ result( "https://y.com" , first) ,
652+ ] ,
645653 ) ,
646654 (
647655 second. to_string( ) ,
648- vec![ result( "https://y.com" , second) , result( "https://z.com" , second) ] ,
656+ vec![
657+ result( "https://y.com" , second) ,
658+ result( "https://z.com" , second) ,
659+ ] ,
649660 ) ,
650661 ]
651662 } ;
@@ -673,9 +684,15 @@ mod tests {
673684
674685 #[ test]
675686 fn synthetic_answers_are_detected_by_scheme ( ) {
676- assert ! ( is_synthetic_answer( & result( "perplexity://answer" , "perplexity" ) ) ) ;
687+ assert ! ( is_synthetic_answer( & result(
688+ "perplexity://answer" ,
689+ "perplexity"
690+ ) ) ) ;
677691 assert ! ( is_synthetic_answer( & result( "tavily://answer" , "tavily" ) ) ) ;
678- assert ! ( !is_synthetic_answer( & result( "https://x.com/search?q=a" , "xai" ) ) ) ;
692+ assert ! ( !is_synthetic_answer( & result(
693+ "https://x.com/search?q=a" ,
694+ "xai"
695+ ) ) ) ;
679696 // A malformed/scheme-less URL is still a result — it must not
680697 // silently vanish into answers[].
681698 assert ! ( !is_synthetic_answer( & result( "example.com/page" , "serper" ) ) ) ;
0 commit comments