From dc921892be95f07914fff21410c12310a8305158 Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Mon, 7 May 2018 11:23:04 -0700 Subject: [PATCH] Eliminate map_or(None, f) --- serde_derive/src/internals/attr.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/serde_derive/src/internals/attr.rs b/serde_derive/src/internals/attr.rs index 3d73359f..96bcd447 100644 --- a/serde_derive/src/internals/attr.rs +++ b/serde_derive/src/internals/attr.rs @@ -777,7 +777,7 @@ impl Field { }; let variant_borrow = attrs - .map_or(None, |variant| variant.borrow.as_ref()) + .and_then(|variant| variant.borrow.as_ref()) .map(|borrow| vec![Meta(borrow.clone())]); for meta_items in field