clippy: pass &str/&[..] instead of &String/&Vec
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
This commit is contained in:
parent
ccec086e25
commit
09faa9ee95
@ -8,7 +8,7 @@ enum PruneMark { Keep, KeepPartial, Remove }
|
||||
|
||||
fn mark_selections<F: Fn(&BackupInfo) -> Result<String, Error>> (
|
||||
mark: &mut HashMap<PathBuf, PruneMark>,
|
||||
list: &Vec<BackupInfo>,
|
||||
list: &[BackupInfo],
|
||||
keep: usize,
|
||||
select_id: F,
|
||||
) -> Result<(), Error> {
|
||||
@ -45,7 +45,7 @@ fn mark_selections<F: Fn(&BackupInfo) -> Result<String, Error>> (
|
||||
|
||||
fn remove_incomplete_snapshots(
|
||||
mark: &mut HashMap<PathBuf, PruneMark>,
|
||||
list: &Vec<BackupInfo>,
|
||||
list: &[BackupInfo],
|
||||
) {
|
||||
|
||||
let mut keep_unfinished = true;
|
||||
|
@ -376,7 +376,7 @@ fn get_server_url() -> (String, usize) {
|
||||
}
|
||||
|
||||
pub fn send_updates_available(
|
||||
updates: &Vec<&APTUpdateInfo>,
|
||||
updates: &[&APTUpdateInfo],
|
||||
) -> Result<(), Error> {
|
||||
// update mails always go to the root@pam configured email..
|
||||
if let Some(email) = lookup_user_email(Userid::root_userid()) {
|
||||
|
@ -173,7 +173,7 @@ pub fn update_changer_online_status(
|
||||
drive_config: &SectionConfigData,
|
||||
inventory: &mut Inventory,
|
||||
changer_name: &str,
|
||||
label_text_list: &Vec<String>,
|
||||
label_text_list: &[String],
|
||||
) -> Result<(), Error> {
|
||||
|
||||
let mut online_map = OnlineStatusMap::new(drive_config)?;
|
||||
|
@ -87,8 +87,8 @@ pub struct SubscriptionInfo {
|
||||
}
|
||||
|
||||
async fn register_subscription(
|
||||
key: &String,
|
||||
server_id: &String,
|
||||
key: &str,
|
||||
server_id: &str,
|
||||
checktime: i64
|
||||
) -> Result<(String, String), Error> {
|
||||
// WHCMS sample code feeds the key into this, but it's just a challenge, so keep it simple
|
||||
|
Loading…
Reference in New Issue
Block a user