[pbs-devel] [PATCH backup 08/13] client: catalog: remove unnecessary sort_unstable_by
Maximiliano Sandoval
m.sandoval at proxmox.com
Mon Dec 2 10:58:03 CET 2024
Fixes the unnecessary_sort_by clippy lint:
```
warning: consider using `sort`
--> proxmox-backup-client/src/catalog.rs:102:13
|
102 | metadata_archives.sort_unstable_by(|a, b| a.cmp(b));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `metadata_archives.sort_unstable()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_sort_by
= note: `#[warn(clippy::unnecessary_sort_by)]` on by default
```
Signed-off-by: Maximiliano Sandoval <m.sandoval at proxmox.com>
---
proxmox-backup-client/src/catalog.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/proxmox-backup-client/src/catalog.rs b/proxmox-backup-client/src/catalog.rs
index 473214c35..b1b22ff24 100644
--- a/proxmox-backup-client/src/catalog.rs
+++ b/proxmox-backup-client/src/catalog.rs
@@ -98,7 +98,7 @@ async fn dump_catalog(param: Value) -> Result<Value, Error> {
metadata_archives.push(archive.filename.clone());
}
}
- metadata_archives.sort_unstable_by(|a, b| a.cmp(b));
+ metadata_archives.sort_unstable();
for archive in &metadata_archives {
let (reader, archive_size) = get_remote_pxar_reader(
--
2.39.5
More information about the pbs-devel
mailing list