mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-20 18:35:41 +00:00
Fix tons of warnings in newest nightly (#2784)
* Fix tons of warnings in newest nightly * Fix sr-api-macro doc tests
This commit is contained in:
@@ -150,7 +150,6 @@ impl ProvideInherentData for InherentDataProvider {
|
||||
}
|
||||
|
||||
fn error_to_string(&self, error: &[u8]) -> Option<String> {
|
||||
use parity_codec::Decode;
|
||||
RuntimeString::decode(&mut &error[..]).map(Into::into)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -703,7 +703,7 @@ mod tests {
|
||||
}
|
||||
|
||||
#[derive(Clone)]
|
||||
struct MockExecutable<'a>(Rc<Fn(MockCtx) -> VmExecResult + 'a>);
|
||||
struct MockExecutable<'a>(Rc<dyn Fn(MockCtx) -> VmExecResult + 'a>);
|
||||
|
||||
impl<'a> MockExecutable<'a> {
|
||||
fn new(f: impl Fn(MockCtx) -> VmExecResult + 'a) -> Self {
|
||||
|
||||
@@ -300,15 +300,15 @@ fn account_removal_removes_storage() {
|
||||
// Verify that all entries from account 1 is removed, while
|
||||
// entries from account 2 is in place.
|
||||
{
|
||||
assert!(<AccountDb<Test>>::get_storage(&DirectAccountDb, &1, Some(&trie_id1), key1).is_none());
|
||||
assert!(<AccountDb<Test>>::get_storage(&DirectAccountDb, &1, Some(&trie_id1), key2).is_none());
|
||||
assert!(<dyn AccountDb<Test>>::get_storage(&DirectAccountDb, &1, Some(&trie_id1), key1).is_none());
|
||||
assert!(<dyn AccountDb<Test>>::get_storage(&DirectAccountDb, &1, Some(&trie_id1), key2).is_none());
|
||||
|
||||
assert_eq!(
|
||||
<AccountDb<Test>>::get_storage(&DirectAccountDb, &2, Some(&trie_id2), key1),
|
||||
<dyn AccountDb<Test>>::get_storage(&DirectAccountDb, &2, Some(&trie_id2), key1),
|
||||
Some(b"3".to_vec())
|
||||
);
|
||||
assert_eq!(
|
||||
<AccountDb<Test>>::get_storage(&DirectAccountDb, &2, Some(&trie_id2), key2),
|
||||
<dyn AccountDb<Test>>::get_storage(&DirectAccountDb, &2, Some(&trie_id2), key2),
|
||||
Some(b"4".to_vec())
|
||||
);
|
||||
}
|
||||
|
||||
@@ -64,7 +64,7 @@ impl<AccountId, AccountIndex> Decode for Address<AccountId, AccountIndex> where
|
||||
{
|
||||
fn decode<I: Input>(input: &mut I) -> Option<Self> {
|
||||
Some(match input.read_byte()? {
|
||||
x @ 0x00...0xef => Address::Index(AccountIndex::from(x as u32)),
|
||||
x @ 0x00..=0xef => Address::Index(AccountIndex::from(x as u32)),
|
||||
0xfc => Address::Index(AccountIndex::from(
|
||||
need_more_than(0xef, u16::decode(input)?)? as u32
|
||||
)),
|
||||
|
||||
Reference in New Issue
Block a user