sp-std -> core (#3199)

First in a series of PRs that reduces our use of sp-std with a view to
deprecating it.

This is just looking at /substrate and moving some of the references
from `sp-std` to `core`.
These particular changes should be uncontroversial.

Where macros are used `::core` should be used to remove any ambiguity.

part of https://github.com/paritytech/polkadot-sdk/issues/2101
This commit is contained in:
Squirrel
2024-02-06 13:01:29 +00:00
committed by GitHub
parent c552fb5495
commit bc2e5e1fe2
75 changed files with 125 additions and 125 deletions
+1 -1
View File
@@ -19,12 +19,12 @@
use crate::types::Delegations;
use codec::{Decode, Encode, MaxEncodedLen};
use core::result::Result;
use scale_info::TypeInfo;
use sp_runtime::{
traits::{Bounded, CheckedDiv, CheckedMul, Zero},
RuntimeDebug,
};
use sp_std::{prelude::*, result::Result};
/// A value denoting the strength of conviction of a vote.
#[derive(
@@ -54,7 +54,7 @@ pub mod v1 {
use super::*;
/// Migration for translating bare `Hash`es into `Bounded<Call>`s.
pub struct Migration<T>(sp_std::marker::PhantomData<T>);
pub struct Migration<T>(core::marker::PhantomData<T>);
impl<T: Config + frame_system::Config<Hash = H256>> OnRuntimeUpgrade for Migration<T> {
#[cfg(feature = "try-runtime")]
@@ -19,11 +19,11 @@
use crate::Tally;
use codec::{Decode, Encode, MaxEncodedLen};
use core::ops::{Add, Div, Mul, Rem};
use scale_info::TypeInfo;
#[cfg(feature = "std")]
use serde::{Deserialize, Serialize};
use sp_runtime::traits::{IntegerSquareRoot, Zero};
use sp_std::ops::{Add, Div, Mul, Rem};
/// A means of determining if a vote is past pass threshold.
#[derive(