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:
Bastian Köcher
2019-06-04 20:09:49 +02:00
committed by GitHub
parent 9700029203
commit 6142f95611
73 changed files with 359 additions and 316 deletions
+2 -2
View File
@@ -26,7 +26,7 @@ use std::hash::Hash;
pub fn read_children<
K: Eq + Hash + Clone + Encode + Decode,
V: Eq + Hash + Clone + Encode + Decode,
>(db: &KeyValueDB, column: Option<u32>, prefix: &[u8], parent_hash: K) -> error::Result<Vec<V>> {
>(db: &dyn KeyValueDB, column: Option<u32>, prefix: &[u8], parent_hash: K) -> error::Result<Vec<V>> {
let mut buf = prefix.to_vec();
parent_hash.using_encoded(|s| buf.extend(s));
@@ -116,6 +116,6 @@ mod tests {
let r2: Vec<u32> = read_children(&db, None, PREFIX, 1_2).unwrap();
assert_eq!(r1, vec![1_3, 1_5]);
assert_eq!(r2.len(), 0);
assert_eq!(r2.len(), 0);
}
}