Skip to content

Commit

Permalink
Use and_then instead of map_or
Browse files Browse the repository at this point in the history
  • Loading branch information
kennethloeffler committed Jul 28, 2023
1 parent b5cf2a2 commit 3648dbd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rbx_xml/src/core.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ pub fn find_serialized_property_descriptor(
class_name: &str,
property_name: &str,
) -> Option<&'static PropertyDescriptor<'static>> {
find_property_descriptors(class_name, property_name).map_or(None, |(_canonical, serialized)| {
find_property_descriptors(class_name, property_name).and_then(|(_canonical, serialized)| {
if let PropertyKind::Canonical {
serialization: PropertySerialization::Migrate(_),
} = serialized.kind
Expand Down

0 comments on commit 3648dbd

Please sign in to comment.