From 3648dbd160ab391853009faf661d23927e06ed58 Mon Sep 17 00:00:00 2001 From: Kenneth Loeffler Date: Fri, 28 Jul 2023 13:23:36 -0700 Subject: [PATCH] Use and_then instead of map_or --- rbx_xml/src/core.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rbx_xml/src/core.rs b/rbx_xml/src/core.rs index 921cdb40d..d06a37b07 100644 --- a/rbx_xml/src/core.rs +++ b/rbx_xml/src/core.rs @@ -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