From cbe8202d2a649e9a3d472b063030cace48706111 Mon Sep 17 00:00:00 2001 From: Steven Presti Date: Fri, 14 Jun 2024 17:15:55 -0400 Subject: [PATCH] lint: msrv lint indicated two changes First: update default_features to default-features in cargo.toml Second: replace get(0) with first() --- Cargo.toml | 4 ++-- src/providers/microsoft/goalstate.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 10c40b82..16530c76 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -37,13 +37,13 @@ debug = true anyhow = "1.0" base64 = "0.21" cfg-if = "1.0" -clap = { version = "4", "default_features" = false, "features" = ["std", "cargo", "derive", "error-context", "help", "suggestions", "usage", "wrap_help"] } +clap = { version = "4", "default-features" = false, "features" = ["std", "cargo", "derive", "error-context", "help", "suggestions", "usage", "wrap_help"] } ipnetwork = ">= 0.17, < 0.21" libflate = "1.3" libsystemd = ">= 0.2.1, < 0.8.0" mailparse = ">= 0.13, < 0.16" maplit = "1.0" -nix = { version = ">= 0.19, < 0.29", "default_features" = false, "features" = [ "mount", "user"] } +nix = { version = ">= 0.19, < 0.29", "default-features" = false, "features" = [ "mount", "user"] } openssh-keys = ">= 0.5, < 0.7" openssl = ">= 0.10.46, < 0.11" pnet_base = ">= 0.26, < 0.35" diff --git a/src/providers/microsoft/goalstate.rs b/src/providers/microsoft/goalstate.rs index f657cf8b..8d1eab2b 100644 --- a/src/providers/microsoft/goalstate.rs +++ b/src/providers/microsoft/goalstate.rs @@ -14,7 +14,7 @@ pub(crate) struct GoalState { impl GoalState { /// Return the certificates endpoint (if any). pub(crate) fn certs_endpoint(&self) -> Option { - let role = match self.container.role_instance_list.role_instances.get(0) { + let role = match self.container.role_instance_list.role_instances.first() { Some(r) => r, None => return None, }; @@ -33,7 +33,7 @@ impl GoalState { .container .role_instance_list .role_instances - .get(0) + .first() .ok_or_else(|| anyhow!("empty RoleInstanceList"))? .instance_id) }