Skip to content

Commit a5f3584

Browse files
committed
Fixing build errors
1 parent e577b22 commit a5f3584

File tree

4 files changed

+12
-4
lines changed

4 files changed

+12
-4
lines changed

crates/cli/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ clap.workspace = true
2828
colored.workspace = true
2929
indicatif = "0.17"
3030
console = "0.15"
31+
tokio.workspace = true
3132

3233
[dev-dependencies]
3334
tokio = { workspace = true, features = ["test-util"] }

crates/diff-engine/src/similarity_scorer.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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
};

crates/parser/src/ast.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff 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,

crates/semantic-analysis/src/function_signature_extractor.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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)]
167167
pub 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)]
180180
pub struct SimilarityBreakdown {
181181
pub exact_name_match: bool,
182182
pub parameter_count_match: bool,

0 commit comments

Comments
 (0)