diff --git a/serde_derive/src/internals/attr.rs b/serde_derive/src/internals/attr.rs index db763e22..2bf7dc3f 100644 --- a/serde_derive/src/internals/attr.rs +++ b/serde_derive/src/internals/attr.rs @@ -689,8 +689,7 @@ impl Container { pub fn serde_path(&self) -> Cow { self.custom_serde_path() - .map(Cow::Borrowed) - .unwrap_or_else(|| Cow::Owned(parse_quote!(_serde))) + .map_or_else(|| Cow::Owned(parse_quote!(_serde)), Cow::Borrowed) } }