use as_str instead clone.

This commit is contained in:
licsber 2024-09-08 10:43:13 +08:00
parent 99c96a0b41
commit f52148194f

View File

@ -53,7 +53,7 @@ fn main() -> io::Result<()> {
let args: Vec<String> = env::args().collect();
let start_path = if args.len() > 1 {
PathBuf::from(args[1].clone())
PathBuf::from(args[1].as_str())
} else {
PathBuf::from(".")
};