Skip to content

Commit

Permalink
depend-o-pocalipse (#9450)
Browse files Browse the repository at this point in the history
Remove unneeded dependencies and dev-dependencies.
Made self_destruct test not dependent on wasm bin size.  
Updated code related to deprecated warning on tracing-subscriber `scope()` 
( See tokio-rs/tracing#1429 )
  • Loading branch information
gilescope authored Aug 13, 2021
1 parent f909719 commit 6713fea
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
5 changes: 3 additions & 2 deletions procedural/src/pallet/parse/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -350,8 +350,9 @@ impl GenericKind {
match self {
GenericKind::None => quote::quote!(),
GenericKind::Config => quote::quote_spanned!(span => T: Config),
GenericKind::ConfigAndInstance =>
quote::quote_spanned!(span => T: Config<I>, I: 'static),
GenericKind::ConfigAndInstance => {
quote::quote_spanned!(span => T: Config<I>, I: 'static)
},
}
}

Expand Down
10 changes: 6 additions & 4 deletions procedural/src/storage/genesis_config/builder_def.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,14 @@ impl BuilderDef {
is_generic |= line.is_generic;

data = Some(match &line.storage_type {
StorageLineTypeDef::Simple(_) if line.is_option =>
StorageLineTypeDef::Simple(_) if line.is_option => {
quote_spanned!(builder.span() =>
// NOTE: the type of `data` is specified when used later in the code
let builder: fn(&Self) -> _ = #builder;
let data = builder(self);
let data = Option::as_ref(&data);
),
)
},
_ => quote_spanned!(builder.span() =>
// NOTE: the type of `data` is specified when used later in the code
let builder: fn(&Self) -> _ = #builder;
Expand All @@ -70,8 +71,9 @@ impl BuilderDef {
is_generic |= line.is_generic;

data = Some(match &line.storage_type {
StorageLineTypeDef::Simple(_) if line.is_option =>
quote!( let data = Some(&self.#config); ),
StorageLineTypeDef::Simple(_) if line.is_option => {
quote!( let data = Some(&self.#config); )
},
_ => quote!( let data = &self.#config; ),
});
};
Expand Down
5 changes: 3 additions & 2 deletions src/traits/tokens/imbalance/signed_imbalance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,13 @@ impl<
SignedImbalance::Positive(one.merge(other)),
(SignedImbalance::Negative(one), SignedImbalance::Negative(other)) =>
SignedImbalance::Negative(one.merge(other)),
(SignedImbalance::Positive(one), SignedImbalance::Negative(other)) =>
(SignedImbalance::Positive(one), SignedImbalance::Negative(other)) => {
match one.offset(other) {
SameOrOther::Same(positive) => SignedImbalance::Positive(positive),
SameOrOther::Other(negative) => SignedImbalance::Negative(negative),
SameOrOther::None => SignedImbalance::Positive(P::zero()),
},
}
},
(one, other) => other.merge(one),
}
}
Expand Down

0 comments on commit 6713fea

Please sign in to comment.