Skip to content

Commit 69b4d76

Browse files
authored
Update rust toolchain (#803)
* switch to stable release * udpate to stable 1.81 * switch back to nightly toolchain * fix clippy
1 parent feafbab commit 69b4d76

File tree

9 files changed

+15
-21
lines changed

9 files changed

+15
-21
lines changed

compose-macros/src/lib.rs

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ macro_rules! compose_call {
5656
/// * 'pallet_metadata' - This crate's parsed pallet metadata as field of the API.
5757
/// * 'call_name' - Call name as &str
5858
/// * 'args' - Optional sequence of arguments of the call. They are not checked against the metadata.
59-
/// As of now the user needs to check himself that the correct arguments are supplied.
59+
/// As of now the user needs to check himself that the correct arguments are supplied.
6060
#[macro_export]
6161
macro_rules! compose_call_for_pallet_metadata {
6262
($pallet_metadata: expr, $call_name: expr $(, $args: expr) *) => {
@@ -145,8 +145,9 @@ macro_rules! compose_extrinsic_with_nonce {
145145
};
146146
}
147147

148-
/// Generates an UncheckedExtrinsic for the given pallet and call, if they are found within the metadata.
149-
/// Otherwise None is returned.
148+
/// Generates an UncheckedExtrinsic for the given pallet and call from the metadata.
149+
///
150+
/// Returns None if call is not found within metadata.
150151
/// Fetches the nonce from the given `api` instance. If this fails, zero is taken as default nonce.
151152
/// See also compose_extrinsic_with_nonce
152153
#[macro_export]
@@ -164,8 +165,9 @@ macro_rules! compose_extrinsic {
164165
};
165166
}
166167

167-
/// Generates an UncheckedExtrinsic for the given pallet and call, if they are found within the metadata.
168-
/// Otherwise None is returned.
168+
/// Generates an UncheckedExtrinsic for the given pallet and call from the metadata.
169+
///
170+
/// Returns None if call is not found within metadata.
169171
/// Fetches the nonce from the given `api` instance. If this fails, zero is taken as default nonce.
170172
/// See also compose_extrinsic_with_nonce
171173
#[macro_export]

node-api/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
//! Contains stuff to instantiate communication with a substrate node.
1515
1616
#![cfg_attr(not(feature = "std"), no_std)]
17-
#![cfg_attr(not(feature = "std"), feature(error_in_core))]
1817

1918
extern crate alloc;
2019

primitives/src/config/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,8 @@ pub trait Config {
129129
+ DeserializeOwned;
130130
}
131131

132+
/// Helper struct for fast Config creation with different Extrinsic Params than the original Config.
133+
///
132134
/// Take a type implementing [`Config`] (eg [`AssetRuntimeConfig`]), and some type which describes the
133135
/// additional and extra parameters to pass to an extrinsic (see [`ExtrinsicParams`]),
134136
/// and returns a type implementing [`Config`] with those new [`ExtrinsicParams`].

primitives/src/types.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,8 @@ pub struct InclusionFee<Balance> {
105105
/// - `targeted_fee_adjustment`: This is a multiplier that can tune the final fee based on the
106106
/// congestion of the network.
107107
/// - `weight_fee`: This amount is computed based on the weight of the transaction. Weight
108-
/// accounts for the execution time of a transaction.
109-
///
110-
/// adjusted_weight_fee = targeted_fee_adjustment * weight_fee
108+
/// accounts for the execution time of a transaction.
109+
/// - `adjusted_weight_fee`` = targeted_fee_adjustment * weight_fee
111110
pub adjusted_weight_fee: Balance,
112111
}
113112

rust-toolchain.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
[toolchain]
2-
channel = "nightly-2024-04-25"
2+
channel = "nightly-2024-09-01"
33
targets = ["wasm32-unknown-unknown", "wasm32-wasip1"]
44
profile = "default" # include rustfmt, clippy

src/api/error.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,7 @@ use ac_node_api::{
2222
};
2323
use alloc::{boxed::Box, vec::Vec};
2424
use codec::{Decode, Encode};
25-
26-
#[cfg(not(feature = "std"))]
2725
use core::error::Error as ErrorT;
28-
#[cfg(feature = "std")]
29-
use std::error::Error as ErrorT;
3026

3127
pub type Result<T> = core::result::Result<T, Error>;
3228

src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
1616
*/
1717
#![cfg_attr(not(feature = "std"), no_std)]
18-
#![cfg_attr(not(feature = "std"), feature(error_in_core))]
1918

2019
extern crate alloc;
2120

src/rpc/error.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,7 @@
1616
*/
1717

1818
use alloc::{boxed::Box, string::String};
19-
#[cfg(not(feature = "std"))]
2019
use core::error::Error as ErrorT;
21-
#[cfg(feature = "std")]
22-
use std::error::Error as ErrorT;
2320

2421
pub type Result<T> = core::result::Result<T, Error>;
2522

test-no-std/src/main.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,15 +95,15 @@ unsafe impl GlobalAlloc for SimpleAllocator {
9595
let align_mask_to_round_down = !(align - 1);
9696

9797
if align > MAX_SUPPORTED_ALIGN {
98-
return null_mut()
98+
return null_mut();
9999
}
100100

101101
let mut allocated = 0;
102102
if self
103103
.remaining
104104
.fetch_update(SeqCst, SeqCst, |mut remaining| {
105105
if size > remaining {
106-
return None
106+
return None;
107107
}
108108
remaining -= size;
109109
remaining &= align_mask_to_round_down;
@@ -112,7 +112,7 @@ unsafe impl GlobalAlloc for SimpleAllocator {
112112
})
113113
.is_err()
114114
{
115-
return null_mut()
115+
return null_mut();
116116
};
117117
(self.arena.get() as *mut u8).add(allocated)
118118
}

0 commit comments

Comments
 (0)