Skip to content

Commit

Permalink
lint clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
korvyashka committed Jan 31, 2024
1 parent e76c121 commit 83a00dd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/commands/edge_app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -623,7 +623,7 @@ impl EdgeAppCommand {
&json,
)?;
if let Some(arr) = response.as_array() {
if let Some(obj) = arr.get(0) {
if let Some(obj) = arr.first() {
if let Some(revision) = obj["revision"].as_u64() {
debug!("New version revision: {}", revision);
return Ok(revision as u32);
Expand All @@ -649,7 +649,7 @@ impl EdgeAppCommand {
}

let versions: Vec<EdgeAppVersion> = serde_json::from_value(response)?;
if let Some(version) = versions.get(0) {
if let Some(version) = versions.first() {
Ok(version.revision)
} else {
Err(CommandError::MissingField)
Expand Down

0 comments on commit 83a00dd

Please sign in to comment.