mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-22 09:11:02 +00:00
Fix warnings in substrate (#1523)
* Fix warnings in substrate * More warnings removed and wasm updated * Fixes error on stable and grumbles * Update wasm files * Add links to the github issue for replacing `error-chain`
This commit is contained in:
@@ -283,15 +283,14 @@ fn decl_store_extra_genesis(
|
||||
}
|
||||
|
||||
|
||||
let serde_bug_bound = if serde_complete_bound.len() > 0 {
|
||||
|
||||
let serde_bug_bound = if !serde_complete_bound.is_empty() {
|
||||
let mut b_ser = String::new();
|
||||
let mut b_dser = String::new();
|
||||
for bound in serde_complete_bound {
|
||||
serde_complete_bound.into_iter().for_each(|bound| {
|
||||
let stype = quote!(#bound);
|
||||
b_ser += &(stype.to_string() + " : " + &scrate.to_string() + "::serde::Serialize, ");
|
||||
b_dser += &(stype.to_string() + " : " + &scrate.to_string() + "::serde::de::DeserializeOwned, ");
|
||||
}
|
||||
b_ser.push_str(&format!("{} : {}::serde::Serialize, ", stype, scrate));
|
||||
b_dser.push_str(&format!("{} : {}::serde::de::DeserializeOwned, ", stype, scrate));
|
||||
});
|
||||
|
||||
quote! {
|
||||
#[serde(bound(serialize = #b_ser))]
|
||||
@@ -336,7 +335,7 @@ fn decl_store_extra_genesis(
|
||||
};
|
||||
quote!{
|
||||
|
||||
#[derive(Serialize, Deserialize)]
|
||||
#[derive(#scrate::Serialize, #scrate::Deserialize)]
|
||||
#[cfg(feature = "std")]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
#[serde(deny_unknown_fields)]
|
||||
@@ -730,4 +729,3 @@ fn get_type_infos(storage_type: &DeclStorageType) -> DeclStorageTypeInfos {
|
||||
map_key,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -268,7 +268,7 @@ macro_rules! __events_to_metadata {
|
||||
}
|
||||
}
|
||||
|
||||
/// Constructs an Event type for a runtime. This is usually called automatically by the
|
||||
/// Constructs an Event type for a runtime. This is usually called automatically by the
|
||||
/// construct_runtime macro. See also __create_decl_macro.
|
||||
#[macro_export]
|
||||
macro_rules! impl_outer_event {
|
||||
@@ -441,6 +441,7 @@ macro_rules! __impl_outer_event_json_metadata {
|
||||
#[allow(dead_code)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use serde_derive::Serialize;
|
||||
|
||||
mod system {
|
||||
pub trait Trait {
|
||||
|
||||
@@ -38,7 +38,6 @@ extern crate substrate_inherents as inherents;
|
||||
#[macro_use]
|
||||
extern crate pretty_assertions;
|
||||
#[cfg(feature = "std")]
|
||||
#[macro_use]
|
||||
extern crate serde_derive;
|
||||
#[cfg(test)]
|
||||
#[macro_use]
|
||||
|
||||
Reference in New Issue
Block a user