mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 07:41:08 +00:00
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:
@@ -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.
|
||||
|
||||
@@ -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"),
|
||||
|
||||
Reference in New Issue
Block a user