@@ -295,7 +295,7 @@ impl AlgorithmDetector {
295295 // Try to extract from the full content first, then fall back to symbol
296296 let sources = vec ! [ & content, symbol] ;
297297 let mut found_param = false ;
298-
298+
299299 for source in sources {
300300 if let Some ( captures) = param_pattern. pattern . captures ( source) {
301301 if let Some ( value_match) = captures. get ( 1 ) {
@@ -311,7 +311,7 @@ impl AlgorithmDetector {
311311 }
312312 }
313313 }
314-
314+
315315 // Use default value if pattern doesn't match anywhere
316316 if !found_param {
317317 if let Some ( default) = & param_pattern. default_value {
@@ -337,30 +337,34 @@ impl AlgorithmDetector {
337337 AssetProperties :: Algorithm ( props) => {
338338 // For deduplication, use algorithm name and primitive only
339339 // This will merge different parameter variations of the same algorithm
340- format ! ( "{}:{}" ,
340+ format ! (
341+ "{}:{}" ,
341342 asset. name. as_ref( ) . unwrap_or( & "unknown" . to_string( ) ) ,
342343 props. primitive as u8
343344 )
344345 }
345- _ => format ! ( "{}:{}" ,
346+ _ => format ! (
347+ "{}:{}" ,
346348 asset. name. as_ref( ) . unwrap_or( & "unknown" . to_string( ) ) ,
347349 asset. bom_ref
348- )
350+ ) ,
349351 }
350352 }
351353
352354 /// Merge algorithm assets with the same name/primitive but different parameters
353355 fn merge_algorithm_assets ( & self , assets : Vec < CryptoAsset > ) -> Vec < CryptoAsset > {
354356 let mut merged_map: HashMap < String , CryptoAsset > = HashMap :: new ( ) ;
355-
357+
356358 for asset in assets {
357359 let key = self . create_deduplication_key ( & asset) ;
358-
360+
359361 if let Some ( existing) = merged_map. get_mut ( & key) {
360362 // Merge parameters if the new asset has more specific information
361- if let ( AssetProperties :: Algorithm ( existing_props) , AssetProperties :: Algorithm ( new_props) ) =
362- ( & mut existing. asset_properties , & asset. asset_properties ) {
363-
363+ if let (
364+ AssetProperties :: Algorithm ( existing_props) ,
365+ AssetProperties :: Algorithm ( new_props) ,
366+ ) = ( & mut existing. asset_properties , & asset. asset_properties )
367+ {
364368 // If existing has no parameters but new one does, use the new parameters
365369 if existing_props. parameter_set . is_none ( ) && new_props. parameter_set . is_some ( ) {
366370 existing_props. parameter_set = new_props. parameter_set . clone ( ) ;
@@ -370,7 +374,7 @@ impl AlgorithmDetector {
370374 merged_map. insert ( key, asset) ;
371375 }
372376 }
373-
377+
374378 merged_map. into_values ( ) . collect ( )
375379 }
376380
0 commit comments