@@ -6,15 +6,15 @@ use colored::*;
66use serde:: { Deserialize , Serialize } ;
77use smart_diff_parser:: { Language , ASTNode } ;
88use smart_diff_engine:: {
9- DiffResult , RefactoringPattern , DetailedChangeClassification , CrossFileMove
9+ DiffResult , RefactoringPattern , DetailedChangeClassification , FunctionMove
1010} ;
11- use smart_diff_semantic:: { SymbolTable , ComplexityMetrics , DependencyGraph } ;
11+ use smart_diff_semantic:: { SymbolTable , FunctionComplexityMetrics , DependencyGraph } ;
1212use std:: collections:: HashMap ;
1313use std:: path:: PathBuf ;
1414use std:: time:: Duration ;
1515
1616/// Complete comparison result for a file pair
17- #[ derive( Debug , Clone , Serialize ) ]
17+ #[ derive( Debug , Clone ) ]
1818pub struct ComparisonResult {
1919 pub source_file : PathBuf ,
2020 pub target_file : PathBuf ,
@@ -23,20 +23,20 @@ pub struct ComparisonResult {
2323 pub classified_changes : Vec < DetailedChangeClassification > ,
2424 pub refactoring_patterns : Vec < RefactoringPattern > ,
2525 pub similarity_scores : Option < HashMap < String , f64 > > ,
26- pub cross_file_moves : Vec < CrossFileMove > ,
26+ pub cross_file_moves : Vec < FunctionMove > ,
2727 pub stats : ComparisonStats ,
2828 pub source_ast : Option < ASTNode > ,
2929 pub target_ast : Option < ASTNode > ,
3030}
3131
3232/// Analysis result for a single file
33- #[ derive( Debug , Clone , Serialize ) ]
33+ #[ derive( Debug , Clone ) ]
3434pub struct AnalysisResult {
3535 pub file_path : PathBuf ,
3636 pub language : Language ,
3737 pub line_count : usize ,
3838 pub symbols : SymbolTable ,
39- pub complexity_metrics : Option < ComplexityMetrics > ,
39+ pub complexity_metrics : Option < FunctionComplexityMetrics > ,
4040 pub dependency_info : Option < DependencyGraph > ,
4141 pub function_signatures : Option < HashMap < String , String > > ,
4242 pub processing_time : Duration ,
@@ -129,7 +129,7 @@ impl OutputFormatter {
129129 } else {
130130 output. push_str ( & format ! ( "{}\n {}\n \n " ,
131131 header. bold( ) . blue( ) ,
132- "=" . repeat( header. len( ) ) . dim ( ) ) ) ;
132+ "=" . repeat( header. len( ) ) . dimmed ( ) ) ) ;
133133 }
134134
135135 for ( index, result) in results. iter ( ) . enumerate ( ) {
@@ -140,7 +140,7 @@ impl OutputFormatter {
140140 } else {
141141 output. push_str ( & format ! ( "{}\n {}\n " ,
142142 file_header. bold( ) . green( ) ,
143- "-" . repeat( file_header. len( ) ) . dim ( ) ) ) ;
143+ "-" . repeat( file_header. len( ) ) . dimmed ( ) ) ) ;
144144 }
145145 }
146146
@@ -156,7 +156,7 @@ impl OutputFormatter {
156156 }
157157
158158 if let Some ( ref deps) = result. dependency_info {
159- output. push_str ( & format ! ( "Dependencies: {}\n " , deps. dependencies . len ( ) ) ) ;
159+ output. push_str ( & format ! ( "Dependencies: {}\n " , deps. edge_count ( ) ) ) ;
160160 }
161161
162162 output. push_str ( "\n " ) ;
@@ -473,7 +473,7 @@ impl OutputFormatter {
473473 html. push_str ( " <meta name=\" viewport\" content=\" width=device-width, initial-scale=1.0\" >\n " ) ;
474474 html. push_str ( " <title>Smart Code Diff Results</title>\n " ) ;
475475 html. push_str ( " <style>\n " ) ;
476- html. push_str ( include_str ! ( "../ assets/diff.css" ) ) ;
476+ html. push_str ( include_str ! ( "assets/diff.css" ) ) ;
477477 html. push_str ( " </style>\n " ) ;
478478 html. push_str ( "</head>\n <body>\n " ) ;
479479
0 commit comments