tree-wide: drop redundant clones
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
This commit is contained in:
@ -150,7 +150,7 @@ pub fn openid_login(
|
||||
};
|
||||
|
||||
let user_id = Userid::try_from(format!("{}@{}", unique_name, realm))?;
|
||||
tested_username = Some(unique_name.to_string());
|
||||
tested_username = Some(unique_name);
|
||||
|
||||
if !user_info.is_active_user_id(&user_id) {
|
||||
if config.autocreate.unwrap_or(false) {
|
||||
@ -246,8 +246,7 @@ fn openid_auth_url(
|
||||
|
||||
let open_id = openid_authenticator(&config, &redirect_url)?;
|
||||
|
||||
let url = open_id.authorize_url(PROXMOX_BACKUP_RUN_DIR_M!(), &realm)?
|
||||
.to_string();
|
||||
let url = open_id.authorize_url(PROXMOX_BACKUP_RUN_DIR_M!(), &realm)?;
|
||||
|
||||
Ok(url.into())
|
||||
}
|
||||
|
@ -969,7 +969,7 @@ pub fn prune_datastore(
|
||||
auth_id.to_string(),
|
||||
to_stdout,
|
||||
move |worker| crate::server::prune_datastore(
|
||||
worker.clone(),
|
||||
worker,
|
||||
auth_id,
|
||||
prune_options,
|
||||
&store,
|
||||
|
@ -1179,7 +1179,6 @@ fn restore_chunk_archive<'a>(
|
||||
|
||||
let mut decoder = ChunkArchiveDecoder::new(reader);
|
||||
|
||||
let datastore2 = datastore.clone();
|
||||
let start_time = std::time::SystemTime::now();
|
||||
let bytes = Arc::new(std::sync::atomic::AtomicU64::new(0));
|
||||
let bytes2 = bytes.clone();
|
||||
@ -1190,7 +1189,7 @@ fn restore_chunk_archive<'a>(
|
||||
"tape restore chunk writer",
|
||||
4,
|
||||
move |(chunk, digest): (DataBlob, [u8; 32])| {
|
||||
let chunk_exists = datastore2.cond_touch_chunk(&digest, false)?;
|
||||
let chunk_exists = datastore.cond_touch_chunk(&digest, false)?;
|
||||
if !chunk_exists {
|
||||
if verbose {
|
||||
task_log!(worker2, "Insert chunk: {}", hex::encode(&digest));
|
||||
@ -1202,7 +1201,7 @@ fn restore_chunk_archive<'a>(
|
||||
chunk.decode(None, Some(&digest))?; // verify digest
|
||||
}
|
||||
|
||||
datastore2.insert_chunk(&chunk, &digest)?;
|
||||
datastore.insert_chunk(&chunk, &digest)?;
|
||||
} else if verbose {
|
||||
task_log!(worker2, "Found existing chunk: {}", hex::encode(&digest));
|
||||
}
|
||||
|
Reference in New Issue
Block a user