Skip to content

Commit

Permalink
Use ? operator
Browse files Browse the repository at this point in the history
  • Loading branch information
titaneric committed Jan 6, 2025
1 parent a4ecc09 commit 5005b31
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/common/expansion.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,7 @@ pub(crate) fn pair_expansion(
let mut expanded_pairs = HashMap::new();
if let Some(opening_prefix) = key_s.strip_suffix('*') {
let output: Result<serde_json::map::Map<String, serde_json::Value>, serde_json::Error> =
serde_json::from_str(value_s);

if let Err(err) = output {
return Err(err);
}
serde_json::from_str(value_s)?;

// key_* -> key_one, key_two, key_three
// * -> one, two, three
Expand Down

0 comments on commit 5005b31

Please sign in to comment.