Remove mem_info and references to parity-util-mem (#12795)

* Remove mem_info and some references to parity-util-mem

* [Draft] Finish removing references to `parity-util-mem`

* Upgrade dependencies

* Update scripts/ci/deny.toml

Co-authored-by: ordian <write@reusable.software>

* Fix Cargo.lock (remove unwanted dependency changes)

* Removed unused argument

* Run cargo fmt (didn't have pre-commit set up)

* Fix some CI errors

* Fix another CI error

* Remove unused dependency

Co-authored-by: ordian <write@reusable.software>
This commit is contained in:
Marcin S
2022-12-06 09:55:10 -05:00
committed by GitHub
parent 07117e7913
commit aa21e56744
46 changed files with 70 additions and 426 deletions
+6 -16
View File
@@ -808,9 +808,6 @@ sp_core::impl_maybe_marker!(
/// A type that implements Serialize, DeserializeOwned and Debug when in std environment.
trait MaybeSerializeDeserialize: DeserializeOwned, Serialize;
/// A type that implements MallocSizeOf.
trait MaybeMallocSizeOf: parity_util_mem::MallocSizeOf;
);
/// A type that can be used in runtime structures.
@@ -828,9 +825,7 @@ pub trait IsMember<MemberId> {
/// `parent_hash`, as well as a `digest` and a block `number`.
///
/// You can also create a `new` one from those fields.
pub trait Header:
Clone + Send + Sync + Codec + Eq + MaybeSerialize + Debug + MaybeMallocSizeOf + 'static
{
pub trait Header: Clone + Send + Sync + Codec + Eq + MaybeSerialize + Debug + 'static {
/// Header number.
type Number: Member
+ MaybeSerializeDeserialize
@@ -840,8 +835,7 @@ pub trait Header:
+ MaybeDisplay
+ AtLeast32BitUnsigned
+ Codec
+ sp_std::str::FromStr
+ MaybeMallocSizeOf;
+ sp_std::str::FromStr;
/// Header hash type
type Hash: Member
+ MaybeSerializeDeserialize
@@ -855,7 +849,6 @@ pub trait Header:
+ Codec
+ AsRef<[u8]>
+ AsMut<[u8]>
+ MaybeMallocSizeOf
+ TypeInfo;
/// Hashing algorithm
type Hashing: Hash<Output = Self::Hash>;
@@ -904,13 +897,11 @@ pub trait Header:
/// `Extrinsic` pieces of information as well as a `Header`.
///
/// You can get an iterator over each of the `extrinsics` and retrieve the `header`.
pub trait Block:
Clone + Send + Sync + Codec + Eq + MaybeSerialize + Debug + MaybeMallocSizeOf + 'static
{
pub trait Block: Clone + Send + Sync + Codec + Eq + MaybeSerialize + Debug + 'static {
/// Type for extrinsics.
type Extrinsic: Member + Codec + Extrinsic + MaybeSerialize + MaybeMallocSizeOf;
type Extrinsic: Member + Codec + Extrinsic + MaybeSerialize;
/// Header type.
type Header: Header<Hash = Self::Hash> + MaybeMallocSizeOf;
type Header: Header<Hash = Self::Hash>;
/// Block hash type.
type Hash: Member
+ MaybeSerializeDeserialize
@@ -924,7 +915,6 @@ pub trait Block:
+ Codec
+ AsRef<[u8]>
+ AsMut<[u8]>
+ MaybeMallocSizeOf
+ TypeInfo;
/// Returns a reference to the header.
@@ -945,7 +935,7 @@ pub trait Block:
}
/// Something that acts like an `Extrinsic`.
pub trait Extrinsic: Sized + MaybeMallocSizeOf {
pub trait Extrinsic: Sized {
/// The function call.
type Call;