File tree Expand file tree Collapse file tree 4 files changed +12
-4
lines changed
Expand file tree Collapse file tree 4 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ clap.workspace = true
2828colored.workspace = true
2929indicatif = " 0.17"
3030console = " 0.15"
31+ tokio.workspace = true
3132
3233[dev-dependencies ]
3334tokio = { workspace = true , features = [" test-util" ] }
Original file line number Diff line number Diff line change @@ -472,7 +472,7 @@ impl SimilarityScorer {
472472 let mut pattern_count = 0 ;
473473
474474 for pattern1 in & patterns1 {
475- let mut best_match = 0.0 ;
475+ let mut best_match: f64 = 0.0 ;
476476 for pattern2 in & patterns2 {
477477 let similarity = self . calculate_pattern_similarity ( pattern1, pattern2) ;
478478 best_match = best_match. max ( similarity) ;
@@ -1185,7 +1185,7 @@ impl SimilarityScorer {
11851185 for ( node_type, count1) in & node_dist1 {
11861186 let count2 = node_dist2. get ( node_type) . unwrap_or ( & 0 ) ;
11871187 let similarity = if count1. max ( count2) > & 0 {
1188- count1. min ( count2) as f64 / count1. max ( count2) as f64
1188+ * count1. min ( count2) as f64 / * count1. max ( count2) as f64
11891189 } else {
11901190 1.0
11911191 } ;
Original file line number Diff line number Diff line change @@ -68,6 +68,13 @@ pub enum NodeType {
6868 EnumValue ,
6969 Inheritance ,
7070 Implementation ,
71+ TypeReference ,
72+
73+ // Import/Export
74+ ImportStatement ,
75+
76+ // Exception handling
77+ ThrowStatement ,
7178
7279 // Other
7380 Comment ,
Original file line number Diff line number Diff line change @@ -163,7 +163,7 @@ pub struct ExtractionStats {
163163}
164164
165165/// Function signature similarity result
166- #[ derive( Debug , Clone ) ]
166+ #[ derive( Debug , Clone , Serialize , Deserialize ) ]
167167pub struct FunctionSignatureSimilarity {
168168 pub overall_similarity : f64 ,
169169 pub name_similarity : f64 ,
@@ -176,7 +176,7 @@ pub struct FunctionSignatureSimilarity {
176176}
177177
178178/// Detailed similarity breakdown
179- #[ derive( Debug , Clone ) ]
179+ #[ derive( Debug , Clone , Serialize , Deserialize ) ]
180180pub struct SimilarityBreakdown {
181181 pub exact_name_match : bool ,
182182 pub parameter_count_match : bool ,
You can’t perform that action at this time.
0 commit comments