style: Migrate to stable-only rustfmt configuration
- Remove nightly-only features from .rustfmt.toml and vendor/ss58-registry/rustfmt.toml - Removed features: imports_granularity, wrap_comments, comment_width, reorder_impl_items, spaces_around_ranges, binop_separator, match_arm_blocks, trailing_semicolon, trailing_comma - Format all 898 affected files with stable rustfmt - Ensures long-term reliability without nightly toolchain dependency
This commit is contained in:
@@ -925,8 +925,9 @@ impl<T: Config> OffchainWorkerMiner<T> {
|
||||
|maybe_head: Result<Option<BlockNumberFor<T>>, _>| {
|
||||
match maybe_head {
|
||||
Ok(Some(head)) if now < head => Err("fork."),
|
||||
Ok(Some(head)) if now >= head && now <= head + threshold =>
|
||||
Err("recently executed."),
|
||||
Ok(Some(head)) if now >= head && now <= head + threshold => {
|
||||
Err("recently executed.")
|
||||
},
|
||||
Ok(Some(head)) if now > head + threshold => {
|
||||
// we can run again now. Write the new head.
|
||||
Ok(now)
|
||||
@@ -961,8 +962,9 @@ impl<T: Config> OffchainWorkerMiner<T> {
|
||||
let storage = StorageValueRef::persistent(&Self::OFFCHAIN_CACHED_CALL);
|
||||
match storage.mutate::<_, (), _>(|_| Ok((call.clone(), snapshot_fingerprint))) {
|
||||
Ok(_) => Ok(()),
|
||||
Err(MutateStorageError::ConcurrentModification(_)) =>
|
||||
Err(OffchainMinerError::FailedToStoreSolution),
|
||||
Err(MutateStorageError::ConcurrentModification(_)) => {
|
||||
Err(OffchainMinerError::FailedToStoreSolution)
|
||||
},
|
||||
Err(MutateStorageError::ValueFunctionFailed(_)) => {
|
||||
// this branch should be unreachable according to the definition of
|
||||
// `StorageValueRef::mutate`: that function should only ever `Err` if the closure we
|
||||
|
||||
@@ -240,8 +240,8 @@ mod pezpallet {
|
||||
"weight of `submit_unsigned` is too high"
|
||||
);
|
||||
assert!(
|
||||
<T as Config>::MinerPages::get() as usize <=
|
||||
<T as crate::Config>::Pages::get() as usize,
|
||||
<T as Config>::MinerPages::get() as usize
|
||||
<= <T as crate::Config>::Pages::get() as usize,
|
||||
"number of pages in the unsigned phase is too high"
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user