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") .context("No username found from the url")
.unwrap(), .unwrap(),
None, None,
&key as &Path, key as &Path,
passwd.as_deref(), passwd.as_deref(),
) )
} else if use_sshagent { } else if use_sshagent {

View file

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

View file

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