fix clippy warnings

This commit is contained in:
qwjyh 2024-06-19 17:37:19 +09:00
parent 78b3d0d308
commit 155992d1cc
3 changed files with 3 additions and 2 deletions

View file

@ -44,7 +44,7 @@ fn clone_repo(
.context("No username found from the url")
.unwrap(),
None,
&key as &Path,
key as &Path,
passwd.as_deref(),
)
} else if use_sshagent {

View file

@ -88,6 +88,7 @@ pub fn write_devices(config_dir: &Path, devices: Vec<Device>) -> Result<()> {
trace!("write_devices");
let f = OpenOptions::new()
.create(true)
.truncate(true)
.write(true)
.open(config_dir.join(DEVICESFILE))?;
let writer = BufWriter::new(f);

View file

@ -17,7 +17,7 @@ impl FilePathCompleter {
return Ok(());
}
self.input = input.to_owned();
input.clone_into(&mut self.input);
self.paths.clear();
let input_path = std::path::PathBuf::from(input);