From b137d447dbd52beb9c843454ae1d11aacb2fef53 Mon Sep 17 00:00:00 2001 From: Steven Presti Date: Fri, 14 Jun 2024 17:17:33 -0400 Subject: [PATCH] lint: silence deadcode warnings Apprently we have had deadcode which is now being picked up by latest MSRV lint. Created issue to evaluate it #1085. --- src/providers/ibmcloud_classic/mod.rs | 4 ++++ src/providers/openstack/configdrive.rs | 1 + src/providers/powervs/mod.rs | 1 + 3 files changed, 6 insertions(+) diff --git a/src/providers/ibmcloud_classic/mod.rs b/src/providers/ibmcloud_classic/mod.rs index 6546f08a..7c31707d 100644 --- a/src/providers/ibmcloud_classic/mod.rs +++ b/src/providers/ibmcloud_classic/mod.rs @@ -46,6 +46,7 @@ pub struct IBMClassicProvider { pub struct MetaDataJSON { /// Fully-Qualified Domain Name (FQDN). #[serde(rename = "hostname")] + #[allow(dead_code)] pub fqdn: String, /// Local hostname. #[serde(rename = "name")] @@ -54,6 +55,7 @@ pub struct MetaDataJSON { #[serde(rename = "uuid")] pub instance_id: String, /// SSH public keys. + #[allow(dead_code)] pub public_keys: HashMap, } @@ -78,9 +80,11 @@ pub struct NetLinkJSON { #[derive(Debug, Deserialize)] pub struct NetNetworkJSON { /// Unique network ID. + #[allow(dead_code)] pub id: String, /// Network type (e.g. `ipv4`) #[serde(rename = "type")] + #[allow(dead_code)] pub kind: String, /// Reference to the underlying interface (see `NetLinkJSON.id`) pub link: String, diff --git a/src/providers/openstack/configdrive.rs b/src/providers/openstack/configdrive.rs index e665e499..3a633b91 100644 --- a/src/providers/openstack/configdrive.rs +++ b/src/providers/openstack/configdrive.rs @@ -40,6 +40,7 @@ pub struct MetadataOpenstackJSON { /// Instance ID. pub uuid: Option, /// Availability zone. + #[allow(dead_code)] pub availability_zone: Option, /// Local hostname. pub hostname: Option, diff --git a/src/providers/powervs/mod.rs b/src/providers/powervs/mod.rs index 49e84a9a..674a6ed5 100644 --- a/src/providers/powervs/mod.rs +++ b/src/providers/powervs/mod.rs @@ -44,6 +44,7 @@ pub struct PowerVSProvider { pub struct MetaDataJSON { /// Fully-Qualified Domain Name (FQDN). #[serde(rename = "hostname")] + #[allow(dead_code)] pub fqdn: String, /// Local hostname. #[serde(rename = "name")]