lint with clippy

fix problems reported by clippy excepts about unused functions
This commit is contained in:
qwjyh 2024-03-18 08:36:07 +09:00
parent 01f959b666
commit bac829c1f1
12 changed files with 296 additions and 313 deletions

View file

@ -174,7 +174,7 @@ impl Backup {
&self.name
}
pub fn device<'a>(&'a self, devices: &'a Vec<Device>) -> Option<&Device> {
pub fn device<'a>(&'a self, devices: &'a [Device]) -> Option<&Device> {
devices.iter().find(|dev| dev.name() == self.device)
}
@ -190,7 +190,7 @@ impl Backup {
&self.command
}
pub fn add_log(&mut self, newlog: BackupLog) -> () {
pub fn add_log(&mut self, newlog: BackupLog) {
self.logs.push(newlog)
}