diff --git a/canister/src/validate/mod.rs b/canister/src/validate/mod.rs index c501b67e..84340c7d 100644 --- a/canister/src/validate/mod.rs +++ b/canister/src/validate/mod.rs @@ -10,7 +10,7 @@ const API_KEY_TOO_LONG_ERROR_MESSAGE: &str = pub fn validate_api_key(api_key: &str) -> Result<(), &'static str> { if api_key.is_empty() { Err("API key must not be an empty string") - } else if api_key.as_bytes().len() > API_KEY_MAX_SIZE { + } else if api_key.len() > API_KEY_MAX_SIZE { Err(API_KEY_TOO_LONG_ERROR_MESSAGE) } else if api_key .chars() diff --git a/integration_tests/src/lib.rs b/integration_tests/src/lib.rs index d4240f19..c3be8e81 100644 --- a/integration_tests/src/lib.rs +++ b/integration_tests/src/lib.rs @@ -115,7 +115,7 @@ pub struct PocketIcRuntime<'a> { } #[async_trait] -impl<'a> Runtime for PocketIcRuntime<'a> { +impl Runtime for PocketIcRuntime<'_> { async fn update_call( &self, id: Principal, diff --git a/rust-toolchain.toml b/rust-toolchain.toml index bd4541d2..bcb3be24 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,4 +1,4 @@ [toolchain] -channel = "1.81.0" +channel = "1.85.0" components = ["rustfmt", "clippy"] targets = ["wasm32-unknown-unknown"]