mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-29 14:57:25 +00:00
Rename: primitives/sr-std -> primitives/sp-std (#4327)
* primitives/sr-std -> primitives/std * fix * fix conflict * rstd -> sp-std * git mv * fix review * fix merge
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
//! Infinite precision unsigned integer for substrate runtime.
|
||||
|
||||
use num_traits::Zero;
|
||||
use rstd::{cmp::Ordering, ops, prelude::*, cell::RefCell, convert::TryFrom};
|
||||
use sp_std::{cmp::Ordering, ops, prelude::*, cell::RefCell, convert::TryFrom};
|
||||
|
||||
// A sensible value for this would be half of the dword size of the host machine. Since the
|
||||
// runtime is compiled to 32bit webassembly, using 32 and 64 for single and double respectively
|
||||
@@ -427,9 +427,9 @@ impl BigUint {
|
||||
}
|
||||
}
|
||||
|
||||
impl rstd::fmt::Debug for BigUint {
|
||||
impl sp_std::fmt::Debug for BigUint {
|
||||
#[cfg(feature = "std")]
|
||||
fn fmt(&self, f: &mut rstd::fmt::Formatter<'_>) -> rstd::fmt::Result {
|
||||
fn fmt(&self, f: &mut sp_std::fmt::Formatter<'_>) -> sp_std::fmt::Result {
|
||||
write!(
|
||||
f,
|
||||
"BigUint {{ {:?} ({:?})}}",
|
||||
@@ -439,7 +439,7 @@ impl rstd::fmt::Debug for BigUint {
|
||||
}
|
||||
|
||||
#[cfg(not(feature = "std"))]
|
||||
fn fmt(&self, _: &mut rstd::fmt::Formatter<'_>) -> rstd::fmt::Result {
|
||||
fn fmt(&self, _: &mut sp_std::fmt::Formatter<'_>) -> sp_std::fmt::Result {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
@@ -646,7 +646,7 @@ pub mod tests {
|
||||
|
||||
#[test]
|
||||
fn can_try_build_numbers_from_types() {
|
||||
use rstd::convert::TryFrom;
|
||||
use sp_std::convert::TryFrom;
|
||||
assert_eq!(u64::try_from(with_limbs(1)).unwrap(), 1);
|
||||
assert_eq!(u64::try_from(with_limbs(2)).unwrap(), u32::max_value() as u64 + 2);
|
||||
assert_eq!(
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Substrate. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
use rstd::{
|
||||
use sp_std::{
|
||||
ops, prelude::*,
|
||||
convert::{TryFrom, TryInto},
|
||||
};
|
||||
@@ -179,14 +179,14 @@ impl CheckedDiv for Fixed64 {
|
||||
}
|
||||
}
|
||||
|
||||
impl rstd::fmt::Debug for Fixed64 {
|
||||
impl sp_std::fmt::Debug for Fixed64 {
|
||||
#[cfg(feature = "std")]
|
||||
fn fmt(&self, f: &mut rstd::fmt::Formatter) -> rstd::fmt::Result {
|
||||
fn fmt(&self, f: &mut sp_std::fmt::Formatter) -> sp_std::fmt::Result {
|
||||
write!(f, "Fixed64({},{})", self.0 / DIV, (self.0 % DIV) / 1000)
|
||||
}
|
||||
|
||||
#[cfg(not(feature = "std"))]
|
||||
fn fmt(&self, _: &mut rstd::fmt::Formatter) -> rstd::fmt::Result {
|
||||
fn fmt(&self, _: &mut sp_std::fmt::Formatter) -> sp_std::fmt::Result {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
use crate::biguint;
|
||||
use num_traits::Zero;
|
||||
use rstd::{cmp::{min, max}, convert::TryInto, mem};
|
||||
use sp_std::{cmp::{min, max}, convert::TryInto, mem};
|
||||
|
||||
/// Helper gcd function used in Rational128 implementation.
|
||||
pub fn gcd(a: u128, b: u128) -> u128 {
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
#[cfg(feature = "std")]
|
||||
use serde::{Serialize, Deserialize};
|
||||
|
||||
use rstd::{ops, prelude::*, convert::TryInto};
|
||||
use sp_std::{ops, prelude::*, convert::TryInto};
|
||||
use codec::{Encode, Decode, CompactAs};
|
||||
use crate::traits::{SaturatedConversion, UniqueSaturatedInto, Saturating};
|
||||
use sp_debug_derive::RuntimeDebug;
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Substrate. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
use rstd::{cmp::Ordering, prelude::*};
|
||||
use sp_std::{cmp::Ordering, prelude::*};
|
||||
use crate::helpers_128bit;
|
||||
use num_traits::Zero;
|
||||
use sp_debug_derive::RuntimeDebug;
|
||||
|
||||
@@ -16,14 +16,14 @@
|
||||
|
||||
//! Primitives for the runtime modules.
|
||||
|
||||
use rstd::{self, convert::{TryFrom, TryInto}};
|
||||
use sp_std::{self, convert::{TryFrom, TryInto}};
|
||||
use codec::HasCompact;
|
||||
pub use integer_sqrt::IntegerSquareRoot;
|
||||
pub use num_traits::{
|
||||
Zero, One, Bounded, CheckedAdd, CheckedSub, CheckedMul, CheckedDiv,
|
||||
CheckedShl, CheckedShr
|
||||
};
|
||||
use rstd::ops::{
|
||||
use sp_std::ops::{
|
||||
Add, Sub, Mul, Div, Rem, AddAssign, SubAssign, MulAssign, DivAssign,
|
||||
RemAssign, Shl, Shr
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user