diff --git a/rust-toolchain.toml b/rust-toolchain.toml index ca5876ebc6..bd4541d29d 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,4 +1,4 @@ [toolchain] -channel = "1.78.0" +channel = "1.81.0" components = ["rustfmt", "clippy"] targets = ["wasm32-unknown-unknown"] diff --git a/src/canisters/frontend/ic-asset/src/batch_upload/plumbing.rs b/src/canisters/frontend/ic-asset/src/batch_upload/plumbing.rs index 417496200f..6df519fc90 100644 --- a/src/canisters/frontend/ic-asset/src/batch_upload/plumbing.rs +++ b/src/canisters/frontend/ic-asset/src/batch_upload/plumbing.rs @@ -416,13 +416,7 @@ async fn make_project_asset( progress: Option<&dyn AssetSyncProgressRenderer>, ) -> Result { let file_size = dfx_core::fs::metadata(&asset_descriptor.source)?.len(); - let permits = std::cmp::max( - 1, - std::cmp::min( - ((file_size + 999999) / 1000000) as usize, - MAX_COST_SINGLE_FILE_MB, - ), - ); + let permits = (((file_size + 999999) / 1000000) as usize).clamp(1, MAX_COST_SINGLE_FILE_MB); let _releaser = semaphores.file.acquire(permits).await; let content = Content::load(&asset_descriptor.source) .map_err(CreateProjectAssetError::LoadContentFailed)?; diff --git a/src/canisters/frontend/ic-certified-assets/src/asset_certification/mod.rs b/src/canisters/frontend/ic-certified-assets/src/asset_certification/mod.rs index b69e5d2233..c8f9fe16ee 100644 --- a/src/canisters/frontend/ic-certified-assets/src/asset_certification/mod.rs +++ b/src/canisters/frontend/ic-certified-assets/src/asset_certification/mod.rs @@ -162,11 +162,13 @@ impl CertifiedResponses { /// If the path has certified responses this function creates a hash tree that proves... /// * The path is part of the CertifiedResponses hash tree + /// /// The hash tree then includes certification for all valid responses for this path. /// /// If the path has no certified responses this function creates a hash tree that proves... /// * The absence of the path in the CertifiedResponses hash tree /// * The presence/absence of a 404 response + /// /// The hash tree then includes certification for all valid responses for a 404 response. /// /// # Return Value @@ -217,11 +219,13 @@ impl CertifiedResponses { /// If the path has certified responses this function creates a hash tree that proves... /// * The path is part of the CertifiedResponses hash tree + /// /// The hash tree then includes certification the valid certification v1 response for this path. /// /// If the path has no certified response this function creates a hash tree that proves... /// * The absence of the path in the CertifiedResponses hash tree /// * The presence/absence of a 404 response + /// /// The hash tree then includes certification for the valid certification v1 response for a 404 response. /// /// # Arguments diff --git a/src/canisters/frontend/ic-certified-assets/src/asset_certification/types/certification.rs b/src/canisters/frontend/ic-certified-assets/src/asset_certification/types/certification.rs index 209dee8b74..ab05f55f16 100644 --- a/src/canisters/frontend/ic-certified-assets/src/asset_certification/types/certification.rs +++ b/src/canisters/frontend/ic-certified-assets/src/asset_certification/types/certification.rs @@ -148,6 +148,7 @@ impl HashTreePath { /// Produces all `HashTreePath`s required to prove /// - whether or not fallback file exists and /// - that there is no fallback file with higher priority + /// /// in the hash tree. pub fn fallback_paths_v2(&self) -> Vec { let mut paths = Vec::new(); diff --git a/src/dfx-core/src/config/project_templates.rs b/src/dfx-core/src/config/project_templates.rs index d6194a7a5d..27c8d3d4b1 100644 --- a/src/dfx-core/src/config/project_templates.rs +++ b/src/dfx-core/src/config/project_templates.rs @@ -59,6 +59,7 @@ pub struct ProjectTemplate { /// - motoko=0 /// - rust=1 /// - everything else=2 (and then by display name) + /// /// For frontend: /// - SvelteKit=0 /// - React=1 @@ -66,6 +67,7 @@ pub struct ProjectTemplate { /// - Vanilla JS=3 /// - No JS Template=4 /// - everything else=5 (and then by display name) + /// /// For extras: /// - Internet Identity=0 /// - Bitcoin=1 diff --git a/src/dfx/src/actors/btc_adapter.rs b/src/dfx/src/actors/btc_adapter.rs index 58a9f4017e..5cc581e99c 100644 --- a/src/dfx/src/actors/btc_adapter.rs +++ b/src/dfx/src/actors/btc_adapter.rs @@ -185,7 +185,7 @@ fn btc_adapter_start_thread( let thread_handler = move || { let btc_adapter_path = config.btc_adapter_path.as_os_str(); let mut cmd = std::process::Command::new(btc_adapter_path); - cmd.arg(&config.config_path.to_string_lossy().to_string()); + cmd.arg(config.config_path.to_string_lossy().to_string()); cmd.stdout(std::process::Stdio::inherit()); cmd.stderr(std::process::Stdio::inherit()); diff --git a/src/dfx/src/actors/canister_http_adapter.rs b/src/dfx/src/actors/canister_http_adapter.rs index 854b8fcac9..ad716db68b 100644 --- a/src/dfx/src/actors/canister_http_adapter.rs +++ b/src/dfx/src/actors/canister_http_adapter.rs @@ -190,7 +190,7 @@ fn canister_http_adapter_start_thread( let thread_handler = move || { let adapter_path = config.adapter_path.as_os_str(); let mut cmd = std::process::Command::new(adapter_path); - cmd.arg(&config.config_path.to_string_lossy().to_string()); + cmd.arg(config.config_path.to_string_lossy().to_string()); cmd.stdout(std::process::Stdio::inherit()); cmd.stderr(std::process::Stdio::inherit()); diff --git a/src/dfx/src/actors/pocketic_proxy.rs b/src/dfx/src/actors/pocketic_proxy.rs index 1684c65f0d..a5e4cb9a4a 100644 --- a/src/dfx/src/actors/pocketic_proxy.rs +++ b/src/dfx/src/actors/pocketic_proxy.rs @@ -40,9 +40,6 @@ pub struct PocketIcProxyConfig { /// fixed replica address pub replica_url: Option, - /// does the proxy need to fetch the root key - pub fetch_root_key: bool, - /// run pocket-ic in non-quiet mode pub verbose: bool, diff --git a/src/dfx/src/commands/build.rs b/src/dfx/src/commands/build.rs index 449912c9ce..2f332aeb7b 100644 --- a/src/dfx/src/commands/build.rs +++ b/src/dfx/src/commands/build.rs @@ -85,11 +85,9 @@ pub fn exec(env: &dyn Environment, opts: CanisterBuildOpts) -> DfxResult { slog::info!(logger, "Building canisters..."); let runtime = Runtime::new().expect("Unable to create a runtime"); - let build_config = - BuildConfig::from_config(&config, env.get_network_descriptor().is_playground())? - .with_build_mode_check(build_mode_check) - .with_canisters_to_build(canisters_to_build) - .with_env_file(env_file); + let build_config = BuildConfig::from_config(&config)? + .with_canisters_to_build(canisters_to_build) + .with_env_file(env_file); runtime.block_on(canister_pool.build_or_fail(&env, logger, &build_config))?; Ok(()) diff --git a/src/dfx/src/commands/generate.rs b/src/dfx/src/commands/generate.rs index bc5debb914..25391393f0 100644 --- a/src/dfx/src/commands/generate.rs +++ b/src/dfx/src/commands/generate.rs @@ -58,11 +58,9 @@ pub fn exec(env: &dyn Environment, opts: GenerateOpts) -> DfxResult { } } let build_config = - BuildConfig::from_config(&config, env.get_network_descriptor().is_playground())? - .with_canisters_to_build(build_before_generate); + BuildConfig::from_config(&config)?.with_canisters_to_build(build_before_generate); let generate_config = - BuildConfig::from_config(&config, env.get_network_descriptor().is_playground())? - .with_canisters_to_build(canisters_to_generate); + BuildConfig::from_config(&config)?.with_canisters_to_build(canisters_to_generate); if build_config .canisters_to_build diff --git a/src/dfx/src/commands/language_service.rs b/src/dfx/src/commands/language_service.rs index 69d0794b85..8d9271d07d 100644 --- a/src/dfx/src/commands/language_service.rs +++ b/src/dfx/src/commands/language_service.rs @@ -75,8 +75,7 @@ pub fn exec(env: &dyn Environment, opts: LanguageServiceOpts) -> DfxResult { } // Add IDL directory flag - let build_config = - BuildConfig::from_config(&config, env.get_network_descriptor().is_playground())?; + let build_config = BuildConfig::from_config(&config)?; package_arguments.append(&mut vec![ "--actor-idl".to_owned(), (*build_config.lsp_root.to_string_lossy()).to_owned(), diff --git a/src/dfx/src/commands/new.rs b/src/dfx/src/commands/new.rs index 27362a46c5..6422c22955 100644 --- a/src/dfx/src/commands/new.rs +++ b/src/dfx/src/commands/new.rs @@ -410,7 +410,7 @@ fn get_agent_js_version_from_npm(dist_tag: &str) -> DfxResult { let output = Command::new(program::NPM) .arg("show") .arg("@dfinity/agent") - .arg(&format!("dist-tags.{}", dist_tag)) + .arg(format!("dist-tags.{}", dist_tag)) .stdout(Stdio::piped()) .stderr(Stdio::inherit()) .output() diff --git a/src/dfx/src/commands/start.rs b/src/dfx/src/commands/start.rs index 3533d857e1..dbe03ec149 100644 --- a/src/dfx/src/commands/start.rs +++ b/src/dfx/src/commands/start.rs @@ -359,7 +359,6 @@ pub fn exec( } save_json_file(&previous_config_path, &effective_config)?; - let network_descriptor = network_descriptor.clone(); let spinner = env.new_spinner("Starting local network...".into()); let system = actix::System::new(); let _proxy = system.block_on(async move { @@ -412,7 +411,6 @@ pub fn exec( let pocketic_proxy_config = PocketIcProxyConfig { bind: address_and_port, replica_url: None, - fetch_root_key: !network_descriptor.is_ic, domains: proxy_domains, verbose: env.get_verbose_level() > 0, }; diff --git a/src/dfx/src/commands/wallet/add_controller.rs b/src/dfx/src/commands/wallet/add_controller.rs index 17baf46ae5..667f923eb4 100644 --- a/src/dfx/src/commands/wallet/add_controller.rs +++ b/src/dfx/src/commands/wallet/add_controller.rs @@ -19,7 +19,7 @@ pub async fn exec(env: &dyn Environment, opts: AddControllerOpts) -> DfxResult { opts.controller ) })?; - wallet_update(env, "add_controller", controller).await?; + wallet_update::<_, ()>(env, "add_controller", controller).await?; println!("Added {} as a controller.", controller); Ok(()) } diff --git a/src/dfx/src/commands/wallet/authorize.rs b/src/dfx/src/commands/wallet/authorize.rs index c1a7aae20d..8c8daf1862 100644 --- a/src/dfx/src/commands/wallet/authorize.rs +++ b/src/dfx/src/commands/wallet/authorize.rs @@ -19,7 +19,7 @@ pub async fn exec(env: &dyn Environment, opts: AuthorizeOpts) -> DfxResult { opts.custodian ) })?; - wallet_update(env, "authorize", custodian).await?; + wallet_update::<_, ()>(env, "authorize", custodian).await?; println!("Authorized {} as a custodian.", custodian); Ok(()) } diff --git a/src/dfx/src/commands/wallet/deauthorize.rs b/src/dfx/src/commands/wallet/deauthorize.rs index 6b1eb7053f..e4900d775e 100644 --- a/src/dfx/src/commands/wallet/deauthorize.rs +++ b/src/dfx/src/commands/wallet/deauthorize.rs @@ -19,7 +19,7 @@ pub async fn exec(env: &dyn Environment, opts: DeauthorizeOpts) -> DfxResult { opts.custodian ) })?; - wallet_update(env, "deauthorize", custodian).await?; + wallet_update::<_, ()>(env, "deauthorize", custodian).await?; println!("Deauthorized {} as a custodian.", opts.custodian); Ok(()) } diff --git a/src/dfx/src/commands/wallet/remove_controller.rs b/src/dfx/src/commands/wallet/remove_controller.rs index 8e8bd342ef..944768ba97 100644 --- a/src/dfx/src/commands/wallet/remove_controller.rs +++ b/src/dfx/src/commands/wallet/remove_controller.rs @@ -19,7 +19,7 @@ pub async fn exec(env: &dyn Environment, opts: RemoveControllerOpts) -> DfxResul opts.controller ) })?; - wallet_update(env, "remove_controller", controller).await?; + wallet_update::<_, ()>(env, "remove_controller", controller).await?; println!("Removed {} as a controller.", controller); Ok(()) } diff --git a/src/dfx/src/commands/wallet/set_name.rs b/src/dfx/src/commands/wallet/set_name.rs index 120b1e3573..61056bc210 100644 --- a/src/dfx/src/commands/wallet/set_name.rs +++ b/src/dfx/src/commands/wallet/set_name.rs @@ -11,7 +11,7 @@ pub struct SetNameOpts { } pub async fn exec(env: &dyn Environment, opts: SetNameOpts) -> DfxResult { - wallet_update(env, "set_name", opts.name.clone()).await?; + wallet_update::<_, ()>(env, "set_name", opts.name.clone()).await?; println!("Set name to {}.", opts.name); Ok(()) } diff --git a/src/dfx/src/lib/builders/assets.rs b/src/dfx/src/lib/builders/assets.rs index 16b0e85f01..6540ea7a19 100644 --- a/src/dfx/src/lib/builders/assets.rs +++ b/src/dfx/src/lib/builders/assets.rs @@ -99,7 +99,6 @@ impl CanisterBuilder for AssetsBuilder { fs::write(&wasm_path, canister_assets).context("Failed to write asset canister wasm")?; let idl_path = info.get_output_root().join(Path::new("assetstorage.did")); Ok(BuildOutput { - canister_id: info.get_canister_id().expect("Could not find canister ID."), wasm: WasmBuildOutput::File(wasm_path), idl: IdlBuildOutput::File(idl_path), }) diff --git a/src/dfx/src/lib/builders/custom.rs b/src/dfx/src/lib/builders/custom.rs index 5895c3ce01..31d9e54b62 100644 --- a/src/dfx/src/lib/builders/custom.rs +++ b/src/dfx/src/lib/builders/custom.rs @@ -107,7 +107,6 @@ impl CanisterBuilder for CustomBuilder { dependencies, } = CustomBuilderExtra::try_from(info, pool)?; - let canister_id = info.get_canister_id().unwrap(); let vars = super::get_and_write_environment_variables( info, &config.network_name, @@ -129,7 +128,6 @@ impl CanisterBuilder for CustomBuilder { } Ok(BuildOutput { - canister_id, wasm: WasmBuildOutput::File(wasm), idl: IdlBuildOutput::File(info.get_output_idl_path().to_path_buf()), }) diff --git a/src/dfx/src/lib/builders/mod.rs b/src/dfx/src/lib/builders/mod.rs index 32eaf1ca96..aab540ed2e 100644 --- a/src/dfx/src/lib/builders/mod.rs +++ b/src/dfx/src/lib/builders/mod.rs @@ -48,7 +48,6 @@ pub enum IdlBuildOutput { /// The output of a build. #[derive(Debug)] pub struct BuildOutput { - pub canister_id: CanisterId, pub wasm: WasmBuildOutput, pub idl: IdlBuildOutput, } @@ -482,16 +481,12 @@ fn write_environment_variables(vars: &[Env<'_>], write_path: &Path) -> DfxResult #[derive(Clone, Debug)] pub struct BuildConfig { profile: Profile, - pub build_mode_check: bool, pub network_name: String, - pub network_is_playground: bool, /// The root of all IDL files. pub idl_root: PathBuf, /// The root for all language server files. pub lsp_root: PathBuf, - /// The root for all build files. - pub build_root: PathBuf, /// If only a subset of canisters should be built, then canisters_to_build contains these canisters' names. /// If all canisters should be built, then this is None. pub canisters_to_build: Option>, @@ -501,7 +496,7 @@ pub struct BuildConfig { impl BuildConfig { #[context("Failed to create build config.")] - pub fn from_config(config: &Config, network_is_playground: bool) -> DfxResult { + pub fn from_config(config: &Config) -> DfxResult { let config_intf = config.get_config(); let network_name = util::network_to_pathcompat(&get_network_context()?); let network_root = config.get_temp_path()?.join(&network_name); @@ -509,10 +504,7 @@ impl BuildConfig { Ok(BuildConfig { network_name, - network_is_playground, profile: config_intf.profile.unwrap_or(Profile::Debug), - build_mode_check: false, - build_root: canister_root.clone(), idl_root: canister_root.join("idl/"), // TODO: possibly move to `network_root.join("idl/")` lsp_root: network_root.join("lsp/"), canisters_to_build: None, @@ -520,13 +512,6 @@ impl BuildConfig { }) } - pub fn with_build_mode_check(self, build_mode_check: bool) -> Self { - Self { - build_mode_check, - ..self - } - } - pub fn with_canisters_to_build(self, canisters: Vec) -> Self { Self { canisters_to_build: Some(canisters), diff --git a/src/dfx/src/lib/builders/motoko.rs b/src/dfx/src/lib/builders/motoko.rs index 5f0ce7fbec..e32b951ae6 100644 --- a/src/dfx/src/lib/builders/motoko.rs +++ b/src/dfx/src/lib/builders/motoko.rs @@ -213,9 +213,6 @@ impl CanisterBuilder for MotokoBuilder { motoko_compile(env, &self.logger, cache, ¶ms)?; Ok(BuildOutput { - canister_id: canister_info - .get_canister_id() - .expect("Could not find canister ID."), wasm: WasmBuildOutput::File(motoko_info.get_output_wasm_path().to_path_buf()), idl: IdlBuildOutput::File(canister_info.get_output_idl_path().to_path_buf()), }) diff --git a/src/dfx/src/lib/builders/pull.rs b/src/dfx/src/lib/builders/pull.rs index e63e59e8f0..5f41e658ac 100644 --- a/src/dfx/src/lib/builders/pull.rs +++ b/src/dfx/src/lib/builders/pull.rs @@ -1,7 +1,6 @@ use crate::lib::builders::{ BuildConfig, BuildOutput, CanisterBuilder, IdlBuildOutput, WasmBuildOutput, }; -use crate::lib::canister_info::pull::PullCanisterInfo; use crate::lib::canister_info::CanisterInfo; use crate::lib::environment::Environment; use crate::lib::error::DfxResult; @@ -45,9 +44,7 @@ impl CanisterBuilder for PullBuilder { canister_info: &CanisterInfo, _config: &BuildConfig, ) -> DfxResult { - let pull_info = canister_info.as_info::()?; Ok(BuildOutput { - canister_id: *pull_info.get_canister_id(), // It's impossible to know if the downloaded wasm is gzip or not with only the info in `dfx.json`. wasm: WasmBuildOutput::None, idl: IdlBuildOutput::File(canister_info.get_output_idl_path().to_path_buf()), diff --git a/src/dfx/src/lib/builders/rust.rs b/src/dfx/src/lib/builders/rust.rs index 3a5d03051e..8f539b0b5a 100644 --- a/src/dfx/src/lib/builders/rust.rs +++ b/src/dfx/src/lib/builders/rust.rs @@ -62,8 +62,6 @@ impl CanisterBuilder for RustBuilder { let rust_info = canister_info.as_info::()?; let package = rust_info.get_package(); - let canister_id = canister_info.get_canister_id().unwrap(); - let mut cargo = Command::new("cargo"); cargo .stdout(Stdio::inherit()) @@ -103,7 +101,6 @@ impl CanisterBuilder for RustBuilder { } Ok(BuildOutput { - canister_id, wasm: WasmBuildOutput::File(rust_info.get_output_wasm_path().to_path_buf()), idl: IdlBuildOutput::File(canister_info.get_output_idl_path().to_path_buf()), }) diff --git a/src/dfx/src/lib/canister_logs/log_visibility.rs b/src/dfx/src/lib/canister_logs/log_visibility.rs index 02e1829cb7..9d3fbf622b 100644 --- a/src/dfx/src/lib/canister_logs/log_visibility.rs +++ b/src/dfx/src/lib/canister_logs/log_visibility.rs @@ -116,13 +116,11 @@ impl LogVisibilityOpt { // Removing. if let Some(removed) = self.remove_log_viewer.as_ref() { - if let Some(visibility) = ¤t_visibility { - match visibility { - LogVisibility::Public | LogVisibility::Controllers => { - return Err(anyhow!("Removing reviewers is not allowed with 'public' or 'controllers' log visibility.")); - } - _ => (), + match ¤t_visibility { + Some(LogVisibility::Public) | Some(LogVisibility::Controllers) => { + return Err(anyhow!("Removing reviewers is not allowed with 'public' or 'controllers' log visibility.")); } + _ => {} } for principal in removed { if let Some(idx) = viewers.iter().position(|x| x == principal) { diff --git a/src/dfx/src/lib/deps/mod.rs b/src/dfx/src/lib/deps/mod.rs index 569d7ffc34..fee13f36d6 100644 --- a/src/dfx/src/lib/deps/mod.rs +++ b/src/dfx/src/lib/deps/mod.rs @@ -36,8 +36,9 @@ pub struct PulledCanister { /// - wasm_hash if defined in the dfx metadata /// - wasm_hash_url content if defined in the dfx metadata /// - otherwise read from canister_status - /// This field is kept here so that users can compare the hash of the downloaded wasm with it - /// If matched, we get extra confidence that the downloaded wasm is correct + /// + /// This field is kept here so that users can compare the hash of the downloaded wasm with it. + /// If matched, we get extra confidence that the downloaded wasm is correct. /// If not matched, it is still acceptable pub wasm_hash: String, /// The downloaded wasm hash when `dfx deps pull` diff --git a/src/dfx/src/lib/migrate.rs b/src/dfx/src/lib/migrate.rs index 5a3c584952..c3a8966b6e 100644 --- a/src/dfx/src/lib/migrate.rs +++ b/src/dfx/src/lib/migrate.rs @@ -108,7 +108,7 @@ async fn migrate_canister( settings: CanisterSettings, } wallet - .call( + .call::<(), _>( Principal::management_canister(), "update_settings", Argument::from_candid((In { diff --git a/src/dfx/src/lib/operations/canister/deploy_canisters.rs b/src/dfx/src/lib/operations/canister/deploy_canisters.rs index bdc1c6ab3d..079645361f 100644 --- a/src/dfx/src/lib/operations/canister/deploy_canisters.rs +++ b/src/dfx/src/lib/operations/canister/deploy_canisters.rs @@ -302,10 +302,9 @@ async fn build_canisters( let build_mode_check = false; let canister_pool = CanisterPool::load(env, build_mode_check, canisters_to_load)?; - let build_config = - BuildConfig::from_config(config, env.get_network_descriptor().is_playground())? - .with_canisters_to_build(canisters_to_build.into()) - .with_env_file(env_file); + let build_config = BuildConfig::from_config(config)? + .with_canisters_to_build(canisters_to_build.into()) + .with_env_file(env_file); canister_pool.build_or_fail(env, log, &build_config).await?; Ok(canister_pool) } diff --git a/src/dfx/src/lib/operations/canister/install_canister.rs b/src/dfx/src/lib/operations/canister/install_canister.rs index ca8c0f6e54..a7f6001e09 100644 --- a/src/dfx/src/lib/operations/canister/install_canister.rs +++ b/src/dfx/src/lib/operations/canister/install_canister.rs @@ -255,7 +255,7 @@ The command line value will be used.", .expect("Selected identity not instantiated."); // Before storing assets, make sure the DFX principal is in there first. wallet - .call( + .call::<(), _>( canister_id, "authorize", Argument::from_candid((self_id,)), diff --git a/src/dfx/src/lib/operations/canister/mod.rs b/src/dfx/src/lib/operations/canister/mod.rs index ef06f9974a..e193fb0411 100644 --- a/src/dfx/src/lib/operations/canister/mod.rs +++ b/src/dfx/src/lib/operations/canister/mod.rs @@ -240,7 +240,7 @@ pub async fn start_canister( canister_id: Principal, } - do_management_call( + do_management_call::<_, ()>( env, canister_id, MgmtMethod::StartCanister.as_ref(), @@ -267,7 +267,7 @@ pub async fn stop_canister( canister_id: Principal, } - do_management_call( + do_management_call::<_, ()>( env, canister_id, MgmtMethod::StopCanister.as_ref(), @@ -291,7 +291,7 @@ pub async fn update_settings( canister_id: Principal, settings: CanisterSettings, } - do_management_call( + do_management_call::<_, ()>( env, canister_id, MgmtMethod::UpdateSettings.as_ref(), @@ -316,7 +316,7 @@ pub async fn uninstall_code( struct In { canister_id: Principal, } - do_management_call( + do_management_call::<_, ()>( env, canister_id, MgmtMethod::UninstallCode.as_ref(), @@ -339,7 +339,7 @@ pub async fn delete_canister( struct In { canister_id: Principal, } - do_management_call( + do_management_call::<_, ()>( env, canister_id, MgmtMethod::DeleteCanister.as_ref(), @@ -363,7 +363,7 @@ pub async fn deposit_cycles( struct In { canister_id: Principal, } - do_management_call( + do_management_call::<_, ()>( env, canister_id, MgmtMethod::DepositCycles.as_ref(), @@ -394,7 +394,7 @@ pub async fn provisional_deposit_cycles( canister_id: Principal, amount: u128, } - do_management_call( + do_management_call::<_, ()>( env, canister_id, MgmtMethod::ProvisionalTopUpCanister.as_ref(), @@ -511,7 +511,7 @@ pub async fn load_canister_snapshot( snapshot_id: &'a [u8], sender_canister_version: Option, } - do_management_call( + do_management_call::<_, ()>( env, canister_id, MgmtMethod::LoadCanisterSnapshot.as_ref(), @@ -564,7 +564,7 @@ pub async fn delete_canister_snapshot( canister_id: Principal, snapshot_id: &'a [u8], } - do_management_call( + do_management_call::<_, ()>( env, canister_id, MgmtMethod::DeleteCanisterSnapshot.as_ref(),