Skip to content

Commit 2f5a71a

Browse files
lctavaresclaude
andcommitted
fix: resolve CI clippy use_self + coverage cfg(coverage) Path import
- Replace recursive type names with Self in enum/struct definitions (audit.rs, results.rs, evaluator/mod.rs, parser.rs) - Remove #[cfg(not(coverage))] from Path import in mod.rs so *_core() functions compile under cargo-llvm-cov coverage instrumentation Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent ec7687e commit 2f5a71a

5 files changed

Lines changed: 11 additions & 12 deletions

File tree

src/cli/commands/audit.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ pub struct AuditDependency {
3636
pub dep_type: String,
3737
pub formula: Option<String>,
3838
pub value: Option<f64>,
39-
pub children: Vec<AuditDependency>,
39+
pub children: Vec<Self>,
4040
}
4141

4242
/// Convert `AuditDependency` tree to serializable `AuditDep`

src/cli/commands/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@ use crate::error::{ForgeError, ForgeResult};
7474
use crate::parser;
7575
use crate::writer;
7676
use colored::Colorize;
77-
#[cfg(any(not(coverage), test))]
7877
use std::path::Path;
7978
use std::path::PathBuf;
8079

src/cli/commands/results.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ pub struct AuditDep {
6363
pub dep_type: String,
6464
pub formula: Option<String>,
6565
pub value: Option<f64>,
66-
pub children: Vec<AuditDep>,
66+
pub children: Vec<Self>,
6767
}
6868

6969
/// Result of the export command

src/core/array_calculator/evaluator/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ pub enum Value {
4444
/// A boolean value
4545
Boolean(bool),
4646
/// An array of values (for table columns)
47-
Array(Vec<Value>),
47+
Array(Vec<Self>),
4848
/// A lambda function value (parameter names, body expression)
4949
Lambda {
5050
params: Vec<String>,

src/core/array_calculator/parser.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,25 +26,25 @@ pub enum Expr {
2626
/// A variable or table.column reference
2727
Reference(Reference),
2828
/// Array indexing: expr[index]
29-
ArrayIndex { array: Box<Expr>, index: Box<Expr> },
29+
ArrayIndex { array: Box<Self>, index: Box<Self> },
3030
/// Function call: NAME(arg1, arg2, ...)
31-
FunctionCall { name: String, args: Vec<Expr> },
31+
FunctionCall { name: String, args: Vec<Self> },
3232
/// Calling the result of an expression: (expr)(args)
3333
/// Used for LAMBDA immediate invocation: LAMBDA(x, x*2)(5)
3434
CallResult {
35-
callable: Box<Expr>,
36-
args: Vec<Expr>,
35+
callable: Box<Self>,
36+
args: Vec<Self>,
3737
},
3838
/// Binary operation: left op right
3939
BinaryOp {
4040
op: String,
41-
left: Box<Expr>,
42-
right: Box<Expr>,
41+
left: Box<Self>,
42+
right: Box<Self>,
4343
},
4444
/// Unary operation: -expr
45-
UnaryOp { op: String, operand: Box<Expr> },
45+
UnaryOp { op: String, operand: Box<Self> },
4646
/// Range expression: A1:B10 (for INDIRECT, etc.)
47-
Range { start: Box<Expr>, end: Box<Expr> },
47+
Range { start: Box<Self>, end: Box<Self> },
4848
}
4949

5050
/// Error during parsing

0 commit comments

Comments
 (0)