From de44cb7b470a879421bdbbf77f453a10c803df56 Mon Sep 17 00:00:00 2001 From: Maximiliano Sandoval Date: Mon, 2 Dec 2024 10:57:58 +0100 Subject: [PATCH] backup_manager: use Vec::first instead of get(0) Fixes the get_first clippy lint: ``` warning: accessing first element with `matching_stores.get(0)` --> src/bin/proxmox_backup_manager/datastore.rs:284:26 | 284 | if let Some(store) = matching_stores.get(0) { | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `matching_stores.first()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first = note: `#[warn(clippy::get_first)]` on by default ``` Signed-off-by: Maximiliano Sandoval --- src/bin/proxmox_backup_manager/datastore.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bin/proxmox_backup_manager/datastore.rs b/src/bin/proxmox_backup_manager/datastore.rs index 8711997d..0918af3a 100644 --- a/src/bin/proxmox_backup_manager/datastore.rs +++ b/src/bin/proxmox_backup_manager/datastore.rs @@ -281,7 +281,7 @@ async fn uuid_mount(param: Value, _rpcenv: &mut dyn RpcEnvironment) -> Result