mirror of
https://github.com/watchexec/watchexec.git
synced 2024-11-16 09:08:37 +01:00
fix some clippy lints
This commit is contained in:
parent
7770de8f7c
commit
cca7b19283
2 changed files with 4 additions and 3 deletions
|
@ -4,6 +4,7 @@ use std::fs;
|
|||
use std::io;
|
||||
use std::io::Read;
|
||||
use std::path::{Path, PathBuf};
|
||||
use std::borrow::{ToOwned};
|
||||
use walkdir::WalkDir;
|
||||
|
||||
pub struct Gitignore {
|
||||
|
@ -58,7 +59,7 @@ pub fn load(paths: &[PathBuf]) -> Gitignore {
|
|||
}
|
||||
}
|
||||
|
||||
p = current.parent().map(|p| p.to_owned());
|
||||
p = current.parent().map(ToOwned::to_owned);
|
||||
}
|
||||
|
||||
if let Some(root) = top_level_git_dir {
|
||||
|
@ -70,7 +71,7 @@ pub fn load(paths: &[PathBuf]) -> Gitignore {
|
|||
.filter(|e| e.file_name() == ".gitignore")
|
||||
{
|
||||
let gitignore_path = entry.path();
|
||||
if let Ok(f) = GitignoreFile::new(&gitignore_path) {
|
||||
if let Ok(f) = GitignoreFile::new(gitignore_path) {
|
||||
debug!("Loaded {:?}", gitignore_path);
|
||||
files.push(f);
|
||||
} else {
|
||||
|
|
|
@ -80,7 +80,7 @@ pub fn load(paths: &[PathBuf]) -> Ignore {
|
|||
.filter(|e| e.file_name() == ".ignore")
|
||||
{
|
||||
let ignore_path = entry.path();
|
||||
if let Ok(f) = IgnoreFile::new(&ignore_path) {
|
||||
if let Ok(f) = IgnoreFile::new(ignore_path) {
|
||||
debug!("Loaded {:?}", ignore_path);
|
||||
files.push(f);
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue