Address review grumbles from #99 (#171)

* Address review grumbles from #99

* obey the fmt
This commit is contained in:
David
2020-09-22 17:29:29 +02:00
committed by GitHub
parent f9f69b8c3b
commit 56bd633706
5 changed files with 6 additions and 17 deletions
+1 -2
View File
@@ -17,8 +17,7 @@ keywords = ["parity", "substrate", "blockchain"]
include = ["Cargo.toml", "src/**/*.rs", "README.md", "LICENSE"]
[features]
kusama = []
default = ["kusama"]
default = []
client = ["substrate-subxt-client"]
# enable this feature to run tests which require a local dev chain node
-3
View File
@@ -6,9 +6,6 @@ A library to **sub**mit e**xt**rinsics to a [substrate](https://github.com/parit
See [examples](./examples).
If you use `#[derive(Call)]` without `#[module]` in the same module, you will get errors
complaining about an undefined method with a name starting with `with_`.
**Alternatives**
[substrate-api-client](https://github.com/scs/substrate-api-client) provides similar functionality.
+4
View File
@@ -133,6 +133,10 @@ decl_derive!(
///
/// Under the hood the implementation calls [submit()](../substrate_subxt/struct.Client.html#method.submit) and
/// [watch()](../substrate_subxt/struct.Client.html#method.watch) respectively.
///
/// *N.B.* You must use the `#[derive(Call)]` macro with `#[module]` in the same module or you will get errors
/// about undefined method with a name starting with `with_`.
#[proc_macro_error] call
);
fn call(s: Structure) -> TokenStream {
+1 -9
View File
@@ -96,15 +96,7 @@ pub trait System {
type Hashing: Hash<Output = Self::Hash>;
/// The user account identifier type for the runtime.
type AccountId: Parameter
+ Member
+ MaybeSerialize
+ Debug
+ MaybeDisplay
+ Encode
+ Decode
+ Ord
+ Default;
type AccountId: Parameter + Member + MaybeSerialize + MaybeDisplay + Ord + Default;
/// The address type. This instead of `<frame_system::Trait::Lookup as StaticLookup>::Source`.
#[module(ignore)]
-3
View File
@@ -52,7 +52,6 @@ impl sp_runtime::BoundToRuntimeAppPublic for Grandpa {
use sp_authority_discovery::AuthorityId as AuthorityDiscoveryId;
#[cfg(feature = "kusama")]
mod validator_app {
use application_crypto::{
app_crypto,
@@ -62,11 +61,9 @@ mod validator_app {
}
/// Parachain marker struct
#[cfg(feature = "kusama")]
#[derive(Copy, Clone, Debug, Default, Eq, PartialEq, Ord, PartialOrd, Hash)]
pub struct Parachains;
#[cfg(feature = "kusama")]
impl sp_runtime::BoundToRuntimeAppPublic for Parachains {
type Public = validator_app::Public;
}