[pbs-devel] [PATCH backup 06/13] client: remove unnecessary deref

Maximiliano Sandoval m.sandoval at proxmox.com
Mon Dec 2 10:58:01 CET 2024


Fixes the needless_option_as_deref clippy lint:

```
warning: derefed type is same as origin
    --> proxmox-backup-client/src/main.rs:1154:21
     |
1154 |                     payload_target.as_ref().as_deref(),
     |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `payload_target.as_ref()`
     |
     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_option_as_deref
     = note: `#[warn(clippy::needless_option_as_deref)]` on by default
```

Signed-off-by: Maximiliano Sandoval <m.sandoval at proxmox.com>
---
 proxmox-backup-client/src/main.rs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/proxmox-backup-client/src/main.rs b/proxmox-backup-client/src/main.rs
index c9be952ad..b0d45f89e 100644
--- a/proxmox-backup-client/src/main.rs
+++ b/proxmox-backup-client/src/main.rs
@@ -1149,7 +1149,7 @@ async fn create_backup(
                     &client,
                     &filename,
                     &target,
-                    payload_target.as_ref().as_deref(),
+                    payload_target.as_ref(),
                     chunk_size_opt,
                     catalog.as_ref().cloned(),
                     pxar_options,
-- 
2.39.5





More information about the pbs-devel mailing list