@@ -665,8 +665,8 @@ impl RefactoringDetector {
665665 confidence,
666666 description : format ! (
667667 "Inlined method '{}' into '{}'" ,
668- deleted. source. as_ref( ) . map( |s| & s. name) . unwrap_or( "unknown" ) ,
669- modified. target. as_ref( ) . map( |t| & t. name) . unwrap_or( "unknown" )
668+ deleted. source. as_ref( ) . map( |s| s. name. as_str ( ) ) . unwrap_or( "unknown" ) ,
669+ modified. target. as_ref( ) . map( |t| t. name. as_str ( ) ) . unwrap_or( "unknown" )
670670 ) ,
671671 affected_elements : vec ! [
672672 deleted. source. as_ref( ) . map( |s| s. name. clone( ) ) . unwrap_or_default( ) ,
@@ -685,7 +685,7 @@ impl RefactoringDetector {
685685
686686 /// Calculate confidence for inline method pattern
687687 fn calculate_inline_method_confidence ( & self , deleted : & Change , modified : & Change ) -> f64 {
688- let mut confidence = 0.0 ;
688+ let mut confidence: f64 = 0.0 ;
689689
690690 // Base confidence for the pattern structure
691691 confidence += 0.4 ;
@@ -745,8 +745,8 @@ impl RefactoringDetector {
745745 confidence,
746746 description : format ! (
747747 "Renamed '{}' to '{}'" ,
748- change. source. as_ref( ) . map( |s| & s. name) . unwrap_or( "unknown" ) ,
749- change. target. as_ref( ) . map( |t| & t. name) . unwrap_or( "unknown" )
748+ change. source. as_ref( ) . map( |s| s. name. as_str ( ) ) . unwrap_or( "unknown" ) ,
749+ change. target. as_ref( ) . map( |t| t. name. as_str ( ) ) . unwrap_or( "unknown" )
750750 ) ,
751751 affected_elements : vec ! [
752752 change. source. as_ref( ) . map( |s| s. name. clone( ) ) . unwrap_or_default( ) ,
@@ -811,9 +811,9 @@ impl RefactoringDetector {
811811 confidence,
812812 description : format ! (
813813 "Moved '{}' from {} to {}" ,
814- change. source. as_ref( ) . map( |s| & s. name) . unwrap_or( "unknown" ) ,
815- change. source. as_ref( ) . map( |s| & s. file_path) . unwrap_or( "unknown" ) ,
816- change. target. as_ref( ) . map( |t| & t. file_path) . unwrap_or( "unknown" )
814+ change. source. as_ref( ) . map( |s| s. name. as_str ( ) ) . unwrap_or( "unknown" ) ,
815+ change. source. as_ref( ) . map( |s| s. file_path. as_str ( ) ) . unwrap_or( "unknown" ) ,
816+ change. target. as_ref( ) . map( |t| t. file_path. as_str ( ) ) . unwrap_or( "unknown" )
817817 ) ,
818818 affected_elements : vec ! [
819819 change. source. as_ref( ) . map( |s| s. name. clone( ) ) . unwrap_or_default( )
0 commit comments