Skip to content

Commit

Permalink
clippy fix
Browse files Browse the repository at this point in the history
  • Loading branch information
andrei-marinica committed Oct 21, 2024
1 parent 5228cb9 commit c33cda1
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 12 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,7 @@ impl Config {
}

pub fn token_amount(&self) -> BigUint {
match BigUint::from_str(&self.amount) {
Ok(amount) => amount,
Err(_) => BigUint::default(),
}
BigUint::from_str(&self.amount).unwrap_or_default()
}

pub fn token_nonce(&self) -> u64 {
Expand Down
2 changes: 1 addition & 1 deletion framework/meta-lib/src/cargo_toml/cargo_toml_contents.rs
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ fn remove_quotes(var: &Value) -> String {
#[cfg(test)]
mod tests {
use super::*;
use crate::cargo_toml::{GitCommitReference, VersionReq};
use crate::cargo_toml::{DependencyReference, GitCommitReference, VersionReq};

#[test]
fn test_change_from_base_to_adapter_path() {
Expand Down
2 changes: 1 addition & 1 deletion framework/meta-lib/src/cargo_toml/version_req.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ impl VersionReq {
}
} else {
VersionReq {
semver: find_version_by_str(&raw).unwrap_or(&LAST_VERSION).clone(),
semver: find_version_by_str(raw).unwrap_or(&LAST_VERSION).clone(),
is_strict: false,
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ fn add_wasm_crate_deps(
) {
let mut wasm_adapter_dep = framework_dependency.clone();
if let Some(path) = &mut wasm_adapter_dep.path {
*path = change_from_base_to_adapter_path(&path);
*path = change_from_base_to_adapter_path(path);
}

cargo_toml_contents.insert_dependency_raw_value(
Expand Down
6 changes: 3 additions & 3 deletions framework/scenario/src/facade/scenario_world.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ pub struct ScenarioWorld {
}

pub(crate) enum Backend {
Debugger(DebuggerBackend),
Debugger(Box<DebuggerBackend>),
VmGoBackend,
}

Expand All @@ -35,10 +35,10 @@ impl ScenarioWorld {
pub fn debugger() -> Self {
ScenarioWorld {
current_dir: std::env::current_dir().unwrap(),
backend: Backend::Debugger(DebuggerBackend {
backend: Backend::Debugger(Box::new(DebuggerBackend {
vm_runner: ScenarioVMRunner::new(),
trace: None,
}),
})),
}
}

Expand Down

0 comments on commit c33cda1

Please sign in to comment.