Skip to content

Commit bdccef0

Browse files
fix: resolve clippy lints (redundant match and derivable_impls)
1 parent cc644e8 commit bdccef0

6 files changed

Lines changed: 32 additions & 9 deletions

File tree

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cli/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -628,7 +628,7 @@ fn run_tests(package: &str) -> Result<()> {
628628
"cargo test for extro-wasm",
629629
)?;
630630
}
631-
"all" | _ => {
631+
_ => {
632632
println!("Testing all packages...\n");
633633
run(
634634
ProcessCommand::new("cargo")

clippy_report.txt

2.25 KB
Binary file not shown.

clippy_report_utf8.txt

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
cargo : Checking extro-cli v0.2.0
2+
(C:\Users\Aditya\Downloads\ex8nsn\cli)
3+
At line:1 char:1
4+
+ cargo clippy -p extro-cli --all-targets -- -D warnings > clippy_repor ...
5+
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
6+
+ CategoryInfo : NotSpecified: ( Checking ex...ads\ex8nsn\
7+
cli):String) [], RemoteException
8+
+ FullyQualifiedErrorId : NativeCommandError
9+
10+
error: wildcard pattern covers any other pattern as it will match anyway
11+
--> cli\src\main.rs:631:9
12+
|
13+
631 | "all" | _ => {
14+
| ^^^^^^^^^
15+
|
16+
= help: consider handling `_` separately
17+
= help: for further information visit https://rust-lang.github.io/rust-
18+
clippy/rust-1.92.0/index.html#wildcard_in_or_patterns
19+
= note: `-D clippy::wildcard-in-or-patterns` implied by `-D warnings`
20+
= help: to override `-D warnings` add
21+
`#[allow(clippy::wildcard_in_or_patterns)]`
22+
23+
error: could not compile `extro-cli` (bin "extro" test) due to 1 previous
24+
error
25+
warning: build failed, waiting for other jobs to finish...
26+
error: could not compile `extro-cli` (bin "extro") due to 1 previous error

crates/agent/src/lib.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,15 @@ pub struct ExecutionTrace {
99
pub reasoning: Option<String>,
1010
}
1111

12+
#[derive(Default)]
1213
pub struct TraceableEngine {
1314
state: CoreState,
1415
traces: Vec<(CoreCommand, ExecutionTrace)>,
1516
}
1617

1718
impl TraceableEngine {
1819
pub fn new() -> Self {
19-
Self {
20-
state: CoreState::new(),
21-
traces: Vec::new(),
22-
}
20+
Self::default()
2321
}
2422

2523
pub fn dispatch_with_trace(

crates/wasm/src/lib.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ use wasm_bindgen::prelude::*;
33
use wasm_bindgen::JsValue;
44

55
#[wasm_bindgen]
6+
#[derive(Default)]
67
pub struct WasmEngine {
78
inner: CoreState,
89
}
@@ -11,9 +12,7 @@ pub struct WasmEngine {
1112
impl WasmEngine {
1213
#[wasm_bindgen(constructor)]
1314
pub fn new() -> Self {
14-
Self {
15-
inner: CoreState::new(),
16-
}
15+
Self::default()
1716
}
1817

1918
#[wasm_bindgen(js_name = dispatch)]

0 commit comments

Comments
 (0)