Skip to content

Commit be12a66

Browse files
authored
Remove PartialEq implementations from CLI flags (#9628)
These are historical artifacts from when the pre-Wasmtime-13 CLI was supported but they're no longer needed nowadays.
1 parent 708b86c commit be12a66

File tree

7 files changed

+6
-34
lines changed

7 files changed

+6
-34
lines changed

crates/cli-flags/src/lib.rs

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -912,31 +912,3 @@ impl CommonOptions {
912912
Ok(())
913913
}
914914
}
915-
916-
impl PartialEq for CommonOptions {
917-
fn eq(&self, other: &CommonOptions) -> bool {
918-
let mut me = self.clone();
919-
me.configure();
920-
let mut other = other.clone();
921-
other.configure();
922-
let CommonOptions {
923-
opts_raw: _,
924-
codegen_raw: _,
925-
debug_raw: _,
926-
wasm_raw: _,
927-
wasi_raw: _,
928-
configured: _,
929-
930-
opts,
931-
codegen,
932-
debug,
933-
wasm,
934-
wasi,
935-
} = me;
936-
opts == other.opts
937-
&& codegen == other.codegen
938-
&& debug == other.debug
939-
&& wasm == other.wasm
940-
&& wasi == other.wasi
941-
}
942-
}

src/commands/compile.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ const AFTER_HELP: &str =
2525
wasmtime compile --target x86_64-unknown-linux -Ccranelift-skylake foo.wasm\n";
2626

2727
/// Compiles a WebAssembly module.
28-
#[derive(Parser, PartialEq)]
28+
#[derive(Parser)]
2929
#[command(
3030
version,
3131
after_help = AFTER_HELP,

src/commands/explore.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use wasmtime::Strategy;
88
use wasmtime_cli_flags::CommonOptions;
99

1010
/// Explore the compilation of a WebAssembly module to native code.
11-
#[derive(Parser, PartialEq)]
11+
#[derive(Parser)]
1212
pub struct ExploreCommand {
1313
#[command(flatten)]
1414
common: CommonOptions,

src/commands/run.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ fn parse_preloads(s: &str) -> Result<(String, PathBuf)> {
3939
}
4040

4141
/// Runs a WebAssembly module
42-
#[derive(Parser, PartialEq)]
42+
#[derive(Parser)]
4343
pub struct RunCommand {
4444
#[command(flatten)]
4545
#[allow(missing_docs)]

src/commands/serve.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ const DEFAULT_ADDR: std::net::SocketAddr = std::net::SocketAddr::new(
6767
);
6868

6969
/// Runs a WebAssembly module
70-
#[derive(Parser, PartialEq)]
70+
#[derive(Parser)]
7171
pub struct ServeCommand {
7272
#[command(flatten)]
7373
run: RunCommon,

src/commands/wast.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use wasmtime_cli_flags::CommonOptions;
88
use wasmtime_wast::{SpectestConfig, WastContext};
99

1010
/// Runs a WebAssembly test script file
11-
#[derive(Parser, PartialEq)]
11+
#[derive(Parser)]
1212
pub struct WastCommand {
1313
#[command(flatten)]
1414
common: CommonOptions,

src/common.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ impl RunTarget {
3838
}
3939

4040
/// Common command line arguments for run commands.
41-
#[derive(Parser, PartialEq)]
41+
#[derive(Parser)]
4242
pub struct RunCommon {
4343
#[command(flatten)]
4444
pub common: CommonOptions,

0 commit comments

Comments
 (0)