diff --git a/Dockerfile b/Dockerfile index 109cc2eee1..c6b6807b2e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,7 +3,7 @@ FROM ubuntu:22.04 as builder SHELL ["bash", "-c"] ARG git_commit_id -ARG rust_version=1.75.0 +ARG rust_version=1.76.0 ARG canister_name ENV GIT_COMMIT_ID=$git_commit_id diff --git a/backend/bots/examples/group_prize_bot/impl/src/jobs/send_prizes.rs b/backend/bots/examples/group_prize_bot/impl/src/jobs/send_prizes.rs index 7acbf4015f..5099c99152 100644 --- a/backend/bots/examples/group_prize_bot/impl/src/jobs/send_prizes.rs +++ b/backend/bots/examples/group_prize_bot/impl/src/jobs/send_prizes.rs @@ -36,7 +36,7 @@ async fn send_prizes_impl() { async fn send_next_prize() -> bool { // 1. Read a bunch of data from the runtime state, pick a random group and prize - let (ledger_canister_id, group, token, prize, end_date, now_nanos, bot_name) = match mutate_state(|state| { + let Some((ledger_canister_id, group, token, prize, end_date, now_nanos, bot_name)) = mutate_state(|state| { if !state.data.started { error!("Not started"); return None; @@ -64,9 +64,8 @@ async fn send_next_prize() -> bool { } None - }) { - Some(t) => t, - None => return false, + }) else { + return false; }; // 2. Transfer the prize funds to the group diff --git a/backend/canisters/user/impl/src/updates/create_community.rs b/backend/canisters/user/impl/src/updates/create_community.rs index 7fa189e50c..3d574c58f3 100644 --- a/backend/canisters/user/impl/src/updates/create_community.rs +++ b/backend/canisters/user/impl/src/updates/create_community.rs @@ -115,7 +115,7 @@ fn prepare(args: Args, state: &RuntimeState) -> Result } } -fn default_channels_valid(default_channels: &Vec) -> bool { +fn default_channels_valid(default_channels: &[String]) -> bool { if default_channels.is_empty() || default_channels .iter() diff --git a/backend/canisters/user_index/impl/src/updates/pay_for_diamond_membership.rs b/backend/canisters/user_index/impl/src/updates/pay_for_diamond_membership.rs index f857e4e4c3..4ff5aac84b 100644 --- a/backend/canisters/user_index/impl/src/updates/pay_for_diamond_membership.rs +++ b/backend/canisters/user_index/impl/src/updates/pay_for_diamond_membership.rs @@ -20,12 +20,11 @@ use utils::time::DAY_IN_MS; #[update(guard = "caller_is_openchat_user")] #[trace] async fn pay_for_diamond_membership(args: Args) -> Response { - let user_id = match read_state(|state| { + let Some(user_id) = read_state(|state| { let caller = state.env.caller(); state.data.users.get_by_principal(&caller).map(|u| u.user_id) - }) { - Some(u) => u, - _ => return UserNotFound, + }) else { + return UserNotFound; }; pay_for_diamond_membership_impl(args, user_id, true).await diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 5453d3a1bc..34499020e0 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,3 +1,3 @@ [toolchain] -channel = "1.75.0" +channel = "1.76.0" targets = ["wasm32-unknown-unknown"] \ No newline at end of file