mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 21:41:12 +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:
@@ -18,9 +18,8 @@ targets = ["x86_64-unknown-linux-gnu"]
|
||||
[dependencies]
|
||||
sp-api = { path = "../api", default-features = false }
|
||||
sp-runtime = { path = "../runtime", default-features = false }
|
||||
sp-std = { path = "../std", default-features = false }
|
||||
serde_json = { features = ["alloc", "arbitrary_precision"], workspace = true }
|
||||
|
||||
[features]
|
||||
default = ["std"]
|
||||
std = ["serde_json/std", "sp-api/std", "sp-runtime/std", "sp-std/std"]
|
||||
std = ["serde_json/std", "sp-api/std", "sp-runtime/std"]
|
||||
|
||||
@@ -31,6 +31,8 @@
|
||||
//! allows to catch and build the raw storage of `RuntimeGenesisConfig` which is the foundation for
|
||||
//! genesis block.
|
||||
|
||||
extern crate alloc;
|
||||
|
||||
/// The result type alias, used in build methods. `Err` contains formatted error message.
|
||||
pub type Result = core::result::Result<(), sp_runtime::RuntimeString>;
|
||||
|
||||
@@ -41,7 +43,7 @@ sp_api::decl_runtime_apis! {
|
||||
///
|
||||
/// This function instantiates the default `RuntimeGenesisConfig` struct for the runtime and serializes it into a JSON
|
||||
/// blob. It returns a `Vec<u8>` containing the JSON representation of the default `RuntimeGenesisConfig`.
|
||||
fn create_default_config() -> sp_std::vec::Vec<u8>;
|
||||
fn create_default_config() -> alloc::vec::Vec<u8>;
|
||||
|
||||
/// Build `RuntimeGenesisConfig` from a JSON blob not using any defaults and store it in the storage.
|
||||
///
|
||||
@@ -50,6 +52,6 @@ sp_api::decl_runtime_apis! {
|
||||
/// It is recommended to log any errors encountered during the process.
|
||||
///
|
||||
/// Please note that provided json blob must contain all `RuntimeGenesisConfig` fields, no defaults will be used.
|
||||
fn build_config(json: sp_std::vec::Vec<u8>) -> Result;
|
||||
fn build_config(json: alloc::vec::Vec<u8>) -> Result;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user