Skip to content

Commit

Permalink
Remove unnecessary else block
Browse files Browse the repository at this point in the history
  • Loading branch information
chrislearn committed Feb 27, 2024
1 parent 0b26abf commit d48f966
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions crates/core/src/serde/request.rs
Original file line number Diff line number Diff line change
Expand Up @@ -315,9 +315,8 @@ impl<'de> RequestDeserializer<'de> {
self.field_str_value = Some(value);
self.field_source = Some(source);
return true;
} else {
return false;
}
return false;
}
Payload::JsonMap(ref map) => {
let mut value = map.get(field_name.as_ref());
Expand All @@ -333,9 +332,8 @@ impl<'de> RequestDeserializer<'de> {
self.field_str_value = Some(value.get());
self.field_source = Some(source);
return true;
} else {
return false;
}
return false;
}
Payload::JsonStr(value) => {
self.field_str_value = Some(*value);
Expand All @@ -362,12 +360,9 @@ impl<'de> RequestDeserializer<'de> {
self.field_vec_value = Some(value.iter().map(|v| CowValue(Cow::from(v))).collect());
self.field_source = Some(source);
return true;
} else {
return false;
}
} else {
return false;
}
return false;
}
_ => {
panic!("unsupported source parser: {:?}", parser);
Expand Down

0 comments on commit d48f966

Please sign in to comment.