fix: future clippy warnings
This commit is contained in:
parent
4ed8861279
commit
7d631b1d24
3 changed files with 4 additions and 4 deletions
|
@ -26,7 +26,7 @@ pub(crate) fn print_migration_lists(config: Config) -> StdResult<()> {
|
|||
|
||||
Vec::new()
|
||||
}
|
||||
Err(e) => panic!(e),
|
||||
Err(e) => panic!("{}", e),
|
||||
};
|
||||
|
||||
println!();
|
||||
|
|
|
@ -139,7 +139,7 @@ impl Config {
|
|||
|
||||
let migrations = entries
|
||||
.iter()
|
||||
.filter_map(Migration::new)
|
||||
.filter_map(|path| Migration::new(&path))
|
||||
.collect::<Vec<_>>();
|
||||
|
||||
Ok(migrations)
|
||||
|
|
|
@ -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()
|
||||
|
|
Reference in a new issue