fix compile warnings (#10993)

* fix warnings

* fix: failing build, use `spec` as dev-dependency
This commit is contained in:
Niklas Adolfsson
2019-08-27 17:29:33 +02:00
committed by Andronik Ordian
parent 505e284932
commit dab2a6bd4b
69 changed files with 203 additions and 199 deletions

View File

@@ -32,7 +32,7 @@ use std::{fs, io, error};
use kvdb::DBTransaction;
use kvdb_rocksdb::{CompactionProfile, Database, DatabaseConfig};
fn other_io_err<E>(e: E) -> io::Error where E: Into<Box<error::Error + Send + Sync>> {
fn other_io_err<E>(e: E) -> io::Error where E: Into<Box<dyn error::Error + Send + Sync>> {
io::Error::new(io::ErrorKind::Other, e)
}
@@ -209,7 +209,7 @@ impl TempIndex {
/// Manages database migration.
pub struct Manager {
config: Config,
migrations: Vec<Box<Migration>>,
migrations: Vec<Box<dyn Migration>>,
}
impl Manager {
@@ -317,7 +317,7 @@ impl Manager {
}
/// Find all needed migrations.
fn migrations_from(&mut self, version: u32) -> Vec<&mut Box<Migration>> {
fn migrations_from(&mut self, version: u32) -> Vec<&mut Box<dyn Migration>> {
self.migrations.iter_mut().filter(|m| m.version() > version).collect()
}
}