Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump Rust version to 1.76.0 #5340

Merged
merged 2 commits into from
Feb 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ fn prepare(args: Args, state: &RuntimeState) -> Result<PrepareResult, Response>
}
}

fn default_channels_valid(default_channels: &Vec<String>) -> bool {
fn default_channels_valid(default_channels: &[String]) -> bool {
if default_channels.is_empty()
|| default_channels
.iter()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[toolchain]
channel = "1.75.0"
channel = "1.76.0"
targets = ["wasm32-unknown-unknown"]
Loading