Skip to content

Commit

Permalink
bump Rust version because a dependency requires it
Browse files Browse the repository at this point in the history
  • Loading branch information
sesi200 committed Dec 10, 2024
1 parent 603e764 commit cf5aca5
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[toolchain]
channel = "1.76.0"
channel = "1.78.0"
components = ["rustfmt", "clippy"]
targets = ["wasm32-unknown-unknown"]
2 changes: 1 addition & 1 deletion src/canisters/frontend/ic-asset/src/asset/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ impl AssetConfig {
}

if other.encodings.is_some() {
self.encodings = other.encodings.clone();
self.encodings.clone_from(&other.encodings);
}

if other.security_policy.is_some() {
Expand Down
2 changes: 1 addition & 1 deletion src/dfx/src/lib/deps/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ pub fn get_pull_canister_or_principal(
let p = Principal::from_text(canister).with_context(||
format!("{canister} is not a valid Principal nor a `type: pull` canister specified in dfx.json")
)?;
if pulled_json.canisters.get(&p).is_none() {
if pulled_json.canisters.contains_key(&p) {
bail!("Could not find {} in pulled.json", &p);
}
Ok(p)
Expand Down
8 changes: 5 additions & 3 deletions src/dfx/src/lib/deps/pull/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -173,9 +173,11 @@ async fn download_and_generate_pulled_canister(
let dfx_metadata_str = get_metadata_as_string(&module, DFX, &wasm_path)?;
let dfx_metadata: DfxMetadata = serde_json::from_str(&dfx_metadata_str)?;
let pullable = dfx_metadata.get_pullable()?;
pulled_canister.dependencies = pullable.dependencies.clone();
pulled_canister.init_guide = pullable.init_guide.clone();
pulled_canister.init_arg = pullable.init_arg.clone();
pulled_canister
.dependencies
.clone_from(&pullable.dependencies);
pulled_canister.init_guide.clone_from(&pullable.init_guide);
pulled_canister.init_arg.clone_from(&pullable.init_arg);

Ok(pulled_canister)
}
Expand Down
2 changes: 1 addition & 1 deletion src/dfx/src/lib/environment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ pub trait Environment {
}

// Explicit lifetimes are actually needed for mockall to work properly.
#[allow(clippy::needless_lifetimes)]
#[allow(clippy::needless_lifetimes, unused)]
fn log<'a>(&self, record: &Record<'a>) {
self.get_logger().log(record);
}
Expand Down
2 changes: 1 addition & 1 deletion src/dfx/src/lib/manifest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ pub fn get_latest_version(
.tags
.get("latest")
.ok_or_else(|| error_invalid_data!("expected field 'latest' in 'tags'"))
.map(|v| v.clone())
.cloned()
}

#[cfg(test)]
Expand Down

0 comments on commit cf5aca5

Please sign in to comment.