sp-std removal from substrate/primitives (#3274)

This PR removes sp-std crate from substrate/primitives sub-directories.

For now crates that have `pub use` of sp-std or export macros that would
necessitate users of the macros to `extern crate alloc` have been
excluded from this PR.

There should be no breaking changes in this PR.

---------

Co-authored-by: Koute <koute@users.noreply.github.com>
This commit is contained in:
Squirrel
2024-03-18 05:29:35 +00:00
committed by GitHub
parent 6b1179f13b
commit 1b5f4243d1
110 changed files with 254 additions and 278 deletions
+2
View File
@@ -20,5 +20,7 @@
#![warn(missing_docs)]
#![cfg_attr(not(feature = "std"), no_std)]
extern crate alloc;
pub mod runtime_api;
pub mod types;
@@ -18,7 +18,7 @@
//! Runtime API for querying mixnet configuration and registering mixnodes.
use super::types::{Mixnode, MixnodesErr, SessionIndex, SessionStatus};
use sp_std::vec::Vec;
use alloc::vec::Vec;
sp_api::decl_runtime_apis! {
/// API to query the mixnet session status and mixnode sets, and to register mixnodes.
+3 -3
View File
@@ -17,9 +17,9 @@
//! Mixnet types used by both host and runtime.
use alloc::vec::Vec;
use codec::{Decode, Encode};
use scale_info::TypeInfo;
use sp_std::vec::Vec;
mod app {
use sp_application_crypto::{app_crypto, key_types::MIXNET, sr25519};
@@ -90,8 +90,8 @@ pub enum MixnodesErr {
},
}
impl sp_std::fmt::Display for MixnodesErr {
fn fmt(&self, fmt: &mut sp_std::fmt::Formatter) -> sp_std::fmt::Result {
impl core::fmt::Display for MixnodesErr {
fn fmt(&self, fmt: &mut core::fmt::Formatter) -> core::fmt::Result {
match self {
MixnodesErr::InsufficientRegistrations { num, min } =>
write!(fmt, "{num} mixnode(s) registered; {min} is the minimum"),