File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -3,11 +3,14 @@ use emmylua_code_analysis::{
33} ;
44use fern:: Dispatch ;
55use 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 }
You can’t perform that action at this time.
0 commit comments