Skip to content

Commit 553f8f1

Browse files
committed
chore: address lints in emmylua_check
1 parent b625883 commit 553f8f1

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

crates/emmylua_check/src/init.rs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,14 @@ use emmylua_code_analysis::{
33
};
44
use fern::Dispatch;
55
use log::LevelFilter;
6-
use std::{path::PathBuf, str::FromStr};
6+
use std::{
7+
path::{Path, PathBuf},
8+
str::FromStr,
9+
};
710

8-
fn root_from_configs(config_paths: &Vec<PathBuf>, fallback: &PathBuf) -> PathBuf {
11+
fn root_from_configs(config_paths: &[PathBuf], fallback: &Path) -> PathBuf {
912
if config_paths.len() != 1 {
10-
fallback.clone()
13+
fallback.to_path_buf()
1114
} else {
1215
let config_path = &config_paths[0];
1316
// Need to convert to canonical path to ensure parent() is not an empty
@@ -20,7 +23,7 @@ fn root_from_configs(config_paths: &Vec<PathBuf>, fallback: &PathBuf) -> PathBuf
2023
config_path,
2124
err
2225
);
23-
fallback.clone()
26+
fallback.to_path_buf()
2427
}
2528
}
2629
}

0 commit comments

Comments
 (0)