fix the warnings
This commit is contained in:
@@ -12,9 +12,9 @@ impl FileBatch {
|
|||||||
let mut filenames = Vec::new();
|
let mut filenames = Vec::new();
|
||||||
let mut paths = Vec::new();
|
let mut paths = Vec::new();
|
||||||
let walker = if recursive {
|
let walker = if recursive {
|
||||||
WalkDir::new(&root_path).min_depth(1).follow_links(false)
|
WalkDir::new(root_path).min_depth(1).follow_links(false)
|
||||||
} else {
|
} else {
|
||||||
WalkDir::new(&root_path)
|
WalkDir::new(root_path)
|
||||||
.min_depth(1)
|
.min_depth(1)
|
||||||
.max_depth(1)
|
.max_depth(1)
|
||||||
.follow_links(false)
|
.follow_links(false)
|
||||||
@@ -22,7 +22,7 @@ impl FileBatch {
|
|||||||
for entry in walker.into_iter().filter_map(|e| e.ok()) {
|
for entry in walker.into_iter().filter_map(|e| e.ok()) {
|
||||||
let path = entry.path();
|
let path = entry.path();
|
||||||
if path.is_file() {
|
if path.is_file() {
|
||||||
match path.strip_prefix(&root_path) {
|
match path.strip_prefix(root_path) {
|
||||||
Ok(relative_path) => {
|
Ok(relative_path) => {
|
||||||
filenames.push(relative_path.to_string_lossy().into_owned());
|
filenames.push(relative_path.to_string_lossy().into_owned());
|
||||||
paths.push(path.to_path_buf());
|
paths.push(path.to_path_buf());
|
||||||
|
|||||||
Reference in New Issue
Block a user