fix: future clippy warnings

This commit is contained in:
Dmitriy Pleshevskiy 2021-02-21 17:53:43 +03:00
parent 4ed8861279
commit 7d631b1d24
3 changed files with 4 additions and 4 deletions

View File

@ -26,7 +26,7 @@ pub(crate) fn print_migration_lists(config: Config) -> StdResult<()> {
Vec::new()
}
Err(e) => panic!(e),
Err(e) => panic!("{}", e),
};
println!();

View File

@ -139,7 +139,7 @@ impl Config {
let migrations = entries
.iter()
.filter_map(Migration::new)
.filter_map(|path| Migration::new(&path))
.collect::<Vec<_>>();
Ok(migrations)

View File

@ -5,7 +5,7 @@ use crate::path::PathBuilder;
use crate::StdResult;
use std::convert::TryFrom;
use std::fs;
use std::path::PathBuf;
use std::path::{Path, PathBuf};
#[derive(Debug)]
pub struct Migration {
@ -15,7 +15,7 @@ pub struct Migration {
}
impl Migration {
pub(crate) fn new(directory: &PathBuf) -> Option<Migration> {
pub(crate) fn new(directory: &Path) -> Option<Migration> {
if directory.is_dir() {
let name = directory
.file_name()