Skip to content

Commit

Permalink
Fix linting errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
johanthoren committed Aug 15, 2024
1 parent 1d2bb38 commit 89aac38
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ async fn main() {
.name(&yaml_or_panic(check_map, "name"))
.command(&yaml_or_panic(check_map, "command"))
.timeout(
match check_map.get(&serde_yaml::Value::String("timeout".to_string())) {
match check_map.get(serde_yaml::Value::String("timeout".to_string())) {
Some(t) => t.as_u64().expect("The timeout is not a valid u64"),
None => DEFAULT_TIMEOUT,
},
Expand Down Expand Up @@ -349,7 +349,7 @@ fn find_and_read_template(template: &str) -> std::io::Result<String> {
}

fn yaml_to_optional_string(map: &serde_yaml::Mapping, key: &str) -> Option<String> {
map.get(&serde_yaml::Value::String(key.to_string()))
map.get(serde_yaml::Value::String(key.to_string()))
.and_then(|v| v.as_str())
.map(|s| s.trim())
.map(|s| s.to_string())
Expand Down

0 comments on commit 89aac38

Please sign in to comment.