Skip to content

Commit

Permalink
refactor: clippy suggestion
Browse files Browse the repository at this point in the history
  • Loading branch information
chesedo committed Nov 17, 2022
1 parent 1676534 commit 496c776
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions deployer/src/persistence/log.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,14 +100,9 @@ fn extract_message(fields: &Value) -> Option<String> {
return Some(message.as_str()?.to_string());
}

if let Some(message) = map.get("message") {
match message {
Value::Object(message_object) => {
if let Some(rendered) = message_object.get("rendered") {
return Some(rendered.as_str()?.to_string());
}
}
_ => {}
if let Some(Value::Object(message_object)) = map.get("message") {
if let Some(rendered) = message_object.get("rendered") {
return Some(rendered.as_str()?.to_string());
}
}
}
Expand Down

0 comments on commit 496c776

Please sign in to comment.