Skip to content

Commit 457b603

Browse files
committed
refactor: fix clippy and fmt
1 parent 541555b commit 457b603

File tree

2 files changed

+11
-8
lines changed

2 files changed

+11
-8
lines changed

clarity/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ rstest_reuse = { version = "0.5.0" }
4747
serde_stacker = "0.1"
4848

4949
[features]
50-
default = ["rusqlite"]
50+
default = ["devtools"]
5151
developer-mode = ["stacks_common/developer-mode", "clarity-types/developer-mode"]
5252
slog_json = ["stacks_common/slog_json"]
5353
rusqlite = ["stacks_common/rusqlite", "clarity-types/rusqlite", "dep:rusqlite"]

clarity/src/vm/ast/mod.rs

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -59,20 +59,22 @@ pub fn parse(
5959
/// Parse a program based on which epoch is active
6060
fn parse_in_epoch(
6161
source_code: &str,
62+
#[cfg(feature = "devtools")]
63+
#[allow(unused_variables)]
6264
epoch_id: StacksEpochId,
6365
) -> ParseResult<Vec<PreSymbolicExpression>> {
6466
#[cfg(feature = "devtools")]
6567
{
66-
parse_v2(source_code)
68+
parse_v2(source_code)
6769
}
6870

6971
#[cfg(not(feature = "devtools"))]
7072
{
71-
if epoch_id >= StacksEpochId::Epoch21 {
72-
parse_v2(source_code)
73-
} else {
74-
parse_v1(source_code)
75-
}
73+
if epoch_id >= StacksEpochId::Epoch21 {
74+
parse_v2(source_code)
75+
} else {
76+
parse_v1(source_code)
77+
}
7678
}
7779
}
7880

@@ -120,6 +122,8 @@ fn inner_build_ast<T: CostTracker>(
120122
source_code: &str,
121123
cost_track: &mut T,
122124
clarity_version: ClarityVersion,
125+
#[cfg(feature = "devtools")]
126+
#[allow(unused_variables)]
123127
epoch: StacksEpochId,
124128
error_early: bool,
125129
) -> ParseResult<(ContractAST, Vec<Diagnostic>, bool)> {
@@ -133,7 +137,6 @@ fn inner_build_ast<T: CostTracker>(
133137
_ => None,
134138
};
135139

136-
137140
#[cfg(feature = "devtools")]
138141
let (pre_expressions, mut diagnostics, mut success) = if error_early {
139142
let exprs = parse_v2(source_code)?;

0 commit comments

Comments
 (0)