Skip to content

Commit

Permalink
lint: address latest lint's from msrv update
Browse files Browse the repository at this point in the history
First: update default_features to default-features in cargo.toml
Second: replace get(0) with first()
  • Loading branch information
prestist committed Jun 17, 2024
1 parent e4893f5 commit c879642
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions src/providers/microsoft/goalstate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ pub(crate) struct GoalState {
impl GoalState {
/// Return the certificates endpoint (if any).
pub(crate) fn certs_endpoint(&self) -> Option<String> {
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,
};
Expand All @@ -33,7 +33,7 @@ impl GoalState {
.container
.role_instance_list
.role_instances
.get(0)
.first()
.ok_or_else(|| anyhow!("empty RoleInstanceList"))?
.instance_id)
}
Expand Down

0 comments on commit c879642

Please sign in to comment.