From 8902e4e502e4e0d8ed3e2d13c566fe48018d9c8b Mon Sep 17 00:00:00 2001 From: Gregory Hill Date: Mon, 6 Sep 2021 13:10:58 +0100 Subject: [PATCH] chore: use nightly-2021-08-01 Signed-off-by: Gregory Hill --- crates/currency/src/lib.rs | 2 +- crates/staking/src/lib.rs | 8 ++++---- rust-toolchain.toml | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/crates/currency/src/lib.rs b/crates/currency/src/lib.rs index 60dafc81b1..5f46d6e9cc 100644 --- a/crates/currency/src/lib.rs +++ b/crates/currency/src/lib.rs @@ -3,7 +3,7 @@ #![deny(warnings)] #![cfg_attr(test, feature(proc_macro_hygiene))] #![cfg_attr(not(feature = "std"), no_std)] -#![feature(const_fn)] +#![feature(const_fn_trait_bound)] #[cfg(test)] mod mock; diff --git a/crates/staking/src/lib.rs b/crates/staking/src/lib.rs index 968580c38e..2f2e3fcc1a 100644 --- a/crates/staking/src/lib.rs +++ b/crates/staking/src/lib.rs @@ -200,13 +200,13 @@ macro_rules! checked_add_mut { <$storage>::mutate($currency, |value| { *value = value.checked_add($amount).ok_or(Error::::ArithmeticOverflow)?; Ok::<_, Error>(*value) - })?; + })? }; ($storage:ty, $currency:expr, $account:expr, $amount:expr) => { <$storage>::mutate($currency, $account, |value| { *value = value.checked_add($amount).ok_or(Error::::ArithmeticOverflow)?; Ok::<_, Error>(*value) - })?; + })? }; } @@ -215,13 +215,13 @@ macro_rules! checked_sub_mut { <$storage>::mutate($currency, |value| { *value = value.checked_sub($amount).ok_or(Error::::ArithmeticUnderflow)?; Ok::<_, Error>(*value) - })?; + })? }; ($storage:ty, $currency:expr, $account:expr, $amount:expr) => { <$storage>::mutate($currency, $account, |value| { *value = value.checked_sub($amount).ok_or(Error::::ArithmeticUnderflow)?; Ok::<_, Error>(*value) - })?; + })? }; } diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 754581499f..3b8652831b 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,4 +1,4 @@ [toolchain] -channel = "nightly-2021-03-15" +channel = "nightly-2021-08-01" components = [ "rustfmt", "rls" ] targets = [ "wasm32-unknown-unknown" ]