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
@@ -32,12 +32,10 @@ use sp_core::storage::{
use sp_externalities::{Extension, ExtensionStore, Externalities, MultiRemovalResults};
use crate::{log_error, trace, warn};
use sp_std::{
use alloc::{boxed::Box, vec, vec::Vec};
use core::{
any::{Any, TypeId},
boxed::Box,
cmp::Ordering,
vec,
vec::Vec,
};
#[cfg(feature = "std")]
use std::error;
@@ -739,7 +737,7 @@ impl<'a> StorageAppend<'a> {
pub fn append(&mut self, value: Vec<u8>) {
let value = vec![EncodeOpaqueValue(value)];
let item = sp_std::mem::take(self.0);
let item = core::mem::take(self.0);
*self.0 = match Vec::<EncodeOpaqueValue>::append_or_new(item, &value) {
Ok(item) => item,