mirror of
https://github.com/pezkuwichain/serde.git
synced 2026-06-12 19:01:02 +00:00
Less indentiation in deserialize_from_body
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user