Less indentiation in deserialize_from_body

This commit is contained in:
David Tolnay committed 2017-12-10 23:04:44 -08:00
1 parent ccae35d92a
commit 85e3ddc2b8
2 files changed
+22 -14

No files matched your search

+9
View File
@@ -164,6 +164,15 @@ pub enum Identifier {
Variant,
}
impl Identifier {
pub fn is_some(self) -> bool {
match self {
Identifier::No => false,
Identifier::Field | Identifier::Variant => true,
}
}
}
impl Container {
/// Extract out the `#[serde(...)]` attributes from an item.
pub fn from_ast(cx: &Ctxt, item: &syn::DeriveInput) -> Self {