mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-14 02:51:08 +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:
@@ -43,9 +43,9 @@ pub type TrieError<H> = trie_db::TrieError<H, Error>;
|
||||
pub trait AsHashDB<H: Hasher>: hash_db::AsHashDB<H, trie_db::DBValue> {}
|
||||
impl<H: Hasher, T: hash_db::AsHashDB<H, trie_db::DBValue>> AsHashDB<H> for T {}
|
||||
/// As in `hash_db`, but less generic, trait exposed.
|
||||
pub type HashDB<'a, H> = hash_db::HashDB<H, trie_db::DBValue> + 'a;
|
||||
pub type HashDB<'a, H> = dyn hash_db::HashDB<H, trie_db::DBValue> + 'a;
|
||||
/// As in `hash_db`, but less generic, trait exposed.
|
||||
pub type PlainDB<'a, K> = hash_db::PlainDB<K, trie_db::DBValue> + 'a;
|
||||
pub type PlainDB<'a, K> = dyn hash_db::PlainDB<K, trie_db::DBValue> + 'a;
|
||||
/// As in `memory_db::MemoryDB` that uses prefixed storage key scheme.
|
||||
pub type PrefixedMemoryDB<H> = memory_db::MemoryDB<H, memory_db::PrefixedKey<H>, trie_db::DBValue>;
|
||||
/// As in `memory_db::MemoryDB` that uses prefixed storage key scheme.
|
||||
@@ -471,7 +471,7 @@ mod tests {
|
||||
}
|
||||
|
||||
fn populate_trie<'db>(
|
||||
db: &'db mut HashDB<Blake2Hasher, DBValue>,
|
||||
db: &'db mut dyn HashDB<Blake2Hasher, DBValue>,
|
||||
root: &'db mut <Blake2Hasher as Hasher>::Out,
|
||||
v: &[(Vec<u8>, Vec<u8>)]
|
||||
) -> TrieDBMut<'db, Blake2Hasher> {
|
||||
|
||||
@@ -60,12 +60,12 @@ impl Decode for NodeHeader {
|
||||
Some(match input.read_byte()? {
|
||||
EMPTY_TRIE => NodeHeader::Null, // 0
|
||||
|
||||
i @ LEAF_NODE_OFFSET ... LEAF_NODE_SMALL_MAX => // 1 ... (127 - 1)
|
||||
i @ LEAF_NODE_OFFSET ..= LEAF_NODE_SMALL_MAX => // 1 ... (127 - 1)
|
||||
NodeHeader::Leaf((i - LEAF_NODE_OFFSET) as usize),
|
||||
LEAF_NODE_BIG => // 127
|
||||
NodeHeader::Leaf(input.read_byte()? as usize + LEAF_NODE_THRESHOLD as usize),
|
||||
|
||||
i @ EXTENSION_NODE_OFFSET ... EXTENSION_NODE_SMALL_MAX =>// 128 ... (253 - 1)
|
||||
i @ EXTENSION_NODE_OFFSET ..= EXTENSION_NODE_SMALL_MAX =>// 128 ... (253 - 1)
|
||||
NodeHeader::Extension((i - EXTENSION_NODE_OFFSET) as usize),
|
||||
EXTENSION_NODE_BIG => // 253
|
||||
NodeHeader::Extension(input.read_byte()? as usize + EXTENSION_NODE_THRESHOLD as usize),
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//! `TrieStream` implementation for Substrate's trie format.
|
||||
//! `TrieStream` implementation for Substrate's trie format.
|
||||
|
||||
use rstd::iter::once;
|
||||
use hash_db::Hasher;
|
||||
@@ -83,7 +83,7 @@ impl trie_root::TrieStream for TrieStream {
|
||||
fn append_substream<H: Hasher>(&mut self, other: Self) {
|
||||
let data = other.out();
|
||||
match data.len() {
|
||||
0...31 => {
|
||||
0..=31 => {
|
||||
data.encode_to(&mut self.buffer)
|
||||
},
|
||||
_ => {
|
||||
|
||||
Reference in New Issue
Block a user