mirror of
https://git.proxmox.com/git/proxmox-backup-qemu
synced 2025-10-05 09:08:40 +00:00
cleanup: avoid unwrap
This commit is contained in:
parent
2f3642766d
commit
599499beaa
@ -49,7 +49,7 @@ impl BackupTask {
|
|||||||
backup_worker_task(setup, crypt_config, connect_tx, command_rx)
|
backup_worker_task(setup, crypt_config, connect_tx, command_rx)
|
||||||
});
|
});
|
||||||
|
|
||||||
connect_rx.recv().unwrap()?;
|
let _worker_start_result = connect_rx.recv()??;
|
||||||
|
|
||||||
Ok(BackupTask {
|
Ok(BackupTask {
|
||||||
worker,
|
worker,
|
||||||
@ -94,12 +94,12 @@ fn backup_worker_task(
|
|||||||
let runtime = match builder.build() {
|
let runtime = match builder.build() {
|
||||||
Ok(runtime) => runtime,
|
Ok(runtime) => runtime,
|
||||||
Err(err) => {
|
Err(err) => {
|
||||||
connect_tx.send(Err(format_err!("create runtime failed: {}", err))).unwrap();
|
connect_tx.send(Err(format_err!("create runtime failed: {}", err)))?;
|
||||||
bail!("create runtime failed");
|
bail!("create runtime failed");
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
connect_tx.send(Ok(())).unwrap();
|
connect_tx.send(Ok(()))?;
|
||||||
drop(connect_tx); // no longer needed
|
drop(connect_tx); // no longer needed
|
||||||
|
|
||||||
let mut client = None;
|
let mut client = None;
|
||||||
|
Loading…
Reference in New Issue
Block a user