@@ -871,10 +871,7 @@ impl LogicEngine {
871871 "weak_point" ,
872872 vec![ Term :: atom( "UnsafeCode" ) , v26. clone( ) , v27] ,
873873 ) ,
874- LogicFact :: new(
875- "context" ,
876- vec![ v26. clone( ) , Term :: atom( "ffi_safe_wrapper" ) ] ,
877- ) ,
874+ LogicFact :: new( "context" , vec![ v26. clone( ) , Term :: atom( "ffi_safe_wrapper" ) ] ) ,
878875 ] ,
879876 RuleMetadata {
880877 confidence : 0.92 ,
@@ -913,10 +910,7 @@ impl LogicEngine {
913910 "weak_point" ,
914911 vec![ Term :: atom( "PanicPath" ) , v28. clone( ) , v29] ,
915912 ) ,
916- LogicFact :: new(
917- "context" ,
918- vec![ v28. clone( ) , Term :: atom( "scanner_source" ) ] ,
919- ) ,
913+ LogicFact :: new( "context" , vec![ v28. clone( ) , Term :: atom( "scanner_source" ) ] ) ,
920914 ] ,
921915 RuleMetadata {
922916 confidence : 0.85 ,
@@ -1057,8 +1051,8 @@ impl LogicEngine {
10571051 || path. contains ( "analyzer" )
10581052 || path. contains ( "scanner" )
10591053 || path. contains ( "detector" ) ;
1060- let high_literal_ratio = fs . lines > 0
1061- && ( fs. unwrap_calls as f64 / fs. lines as f64 ) >= 0.10 ;
1054+ let high_literal_ratio =
1055+ fs . lines > 0 && ( fs. unwrap_calls as f64 / fs. lines as f64 ) >= 0.10 ;
10621056 if is_scanner_path && high_literal_ratio {
10631057 self . db . assert_fact ( LogicFact :: new (
10641058 "context" ,
@@ -1682,11 +1676,7 @@ mod tests {
16821676 let mut engine = LogicEngine :: new ( ) ;
16831677 engine. extract_context_facts ( & report) ;
16841678 assert ! (
1685- !has_context(
1686- & engine,
1687- "crates/oo7-core/src/plain.rs" ,
1688- "ffi_safe_wrapper"
1689- ) ,
1679+ !has_context( & engine, "crates/oo7-core/src/plain.rs" , "ffi_safe_wrapper" ) ,
16901680 "ffi_safe_wrapper=false must not leak the context fact"
16911681 ) ;
16921682 }
@@ -1756,16 +1746,8 @@ mod tests {
17561746 safe_unwrap_calls: 0 ,
17571747 } ] ,
17581748 vec ! [
1759- make_weak_point(
1760- WeakPointCategory :: UnsafeCode ,
1761- path,
1762- "8 unsafe blocks" ,
1763- ) ,
1764- make_weak_point(
1765- WeakPointCategory :: PanicPath ,
1766- path,
1767- "20 unwrap/expect calls" ,
1768- ) ,
1749+ make_weak_point( WeakPointCategory :: UnsafeCode , path, "8 unsafe blocks" ) ,
1750+ make_weak_point( WeakPointCategory :: PanicPath , path, "20 unwrap/expect calls" ) ,
17691751 ] ,
17701752 ) ;
17711753 crate :: assail:: apply_suppression ( & mut report) ;
0 commit comments