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
+3 -2
View File
@@ -19,9 +19,10 @@
use super::node_header::{NodeHeader, NodeKind};
use crate::{error::Error, trie_constants};
use alloc::{borrow::Borrow, vec::Vec};
use codec::{Compact, Decode, Encode, Input};
use core::{marker::PhantomData, ops::Range};
use hash_db::Hasher;
use sp_std::{borrow::Borrow, marker::PhantomData, ops::Range, vec::Vec};
use trie_db::{
nibble_ops,
node::{NibbleSlicePlan, NodeHandlePlan, NodePlan, Value, ValuePlan},
@@ -30,7 +31,7 @@ use trie_db::{
/// Helper struct for trie node decoder. This implements `codec::Input` on a byte slice, while
/// tracking the absolute position. This is similar to `std::io::Cursor` but does not implement
/// `Read` and `io` is not in `sp-std`.
/// `Read` and `io` are not in `core` or `alloc`.
struct ByteSliceInput<'a> {
data: &'a [u8],
offset: usize,