mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 15:11:03 +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,7 +20,6 @@ codec = { package = "parity-scale-codec", version = "3.6.1", default-features =
|
||||
scale-info = { version = "2.10.0", default-features = false, features = ["derive"] }
|
||||
sp-api = { default-features = false, path = "../api" }
|
||||
sp-application-crypto = { default-features = false, path = "../application-crypto" }
|
||||
sp-std = { default-features = false, path = "../std" }
|
||||
|
||||
[features]
|
||||
default = ["std"]
|
||||
@@ -29,5 +28,4 @@ std = [
|
||||
"scale-info/std",
|
||||
"sp-api/std",
|
||||
"sp-application-crypto/std",
|
||||
"sp-std/std",
|
||||
]
|
||||
|
||||
@@ -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