Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Patrick José Pereira <[email protected]>
  • Loading branch information
RaulTrombin and patrickelectric authored Jul 30, 2024
1 parent 6b1a7e9 commit 9601a25
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions build/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -195,17 +195,7 @@ impl MessageDefinition {
.map(|element| Payload::from_json(element))
.collect(),
category,
returns_message: match value.get("returns_message") {
Some(returns_message) => {
let returns_message = returns_message.as_str().unwrap();
if returns_message.is_empty() {
None
} else {
Some(returns_message.into())
}
}
None => None,
},
returns_message: value.get("returns_message").and_then(|value| Some(value.to_string())).or(None)
}
}

Expand Down

0 comments on commit 9601a25

Please sign in to comment.