cleanup deprecation warnings about missing dyn with trait objects (#2997)

This commit is contained in:
Antioch Peverell
2019-08-26 21:17:47 +01:00
committed by GitHub
parent d06b56cf6d
commit dcd405e263
12 changed files with 16 additions and 16 deletions
+1 -1
View File
@@ -123,7 +123,7 @@ pub struct HeaderEntry {
}
impl Readable for HeaderEntry {
fn read(reader: &mut Reader) -> Result<HeaderEntry, ser::Error> {
fn read(reader: &mut dyn Reader) -> Result<HeaderEntry, ser::Error> {
let hash = Hash::read(reader)?;
let timestamp = reader.read_u64()?;
let total_difficulty = Difficulty::read(reader)?;
+1 -1
View File
@@ -53,7 +53,7 @@ pub trait Backend<T: PMMRable> {
fn get_data_from_file(&self, position: u64) -> Option<T::E>;
/// Iterator over current (unpruned, unremoved) leaf positions.
fn leaf_pos_iter(&self) -> Box<Iterator<Item = u64> + '_>;
fn leaf_pos_iter(&self) -> Box<dyn Iterator<Item = u64> + '_>;
/// Remove Hash by insertion position. An index is also provided so the
/// underlying backend can implement some rollback of positions up to a
+1 -1
View File
@@ -50,7 +50,7 @@ where
}
/// Reference to the underlying storage backend.
pub fn backend(&'a self) -> &Backend<T> {
pub fn backend(&'a self) -> &dyn Backend<T> {
self.backend
}