move attributes to common part
This commit is contained in:
parent
a5fb60a5c0
commit
61f9badbe7
@ -28,9 +28,7 @@ fn get_value(iter: &mut TokenTreeIter) -> Option<String> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl YaSerdeAttribute {
|
impl YaSerdeAttribute {
|
||||||
|
|
||||||
pub fn parse(attrs: &Vec<Attribute>) -> YaSerdeAttribute {
|
pub fn parse(attrs: &Vec<Attribute>) -> YaSerdeAttribute {
|
||||||
|
|
||||||
let mut root = None;
|
let mut root = None;
|
||||||
let mut rename = None;
|
let mut rename = None;
|
||||||
let mut attribute = false;
|
let mut attribute = false;
|
||||||
@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
use de::attribute::*;
|
use attribute::*;
|
||||||
use de::field_type::*;
|
use de::field_type::*;
|
||||||
use quote::Tokens;
|
use quote::Tokens;
|
||||||
use syn::Ident;
|
use syn::Ident;
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
|
|
||||||
pub mod attribute;
|
|
||||||
pub mod expand_struct;
|
pub mod expand_struct;
|
||||||
pub mod field_type;
|
pub mod field_type;
|
||||||
|
|
||||||
|
use attribute;
|
||||||
use proc_macro2::Span;
|
use proc_macro2::Span;
|
||||||
use quote;
|
use quote;
|
||||||
use syn;
|
use syn;
|
||||||
|
|||||||
@ -6,6 +6,7 @@ extern crate proc_macro2;
|
|||||||
extern crate quote;
|
extern crate quote;
|
||||||
extern crate syn;
|
extern crate syn;
|
||||||
|
|
||||||
|
mod attribute;
|
||||||
mod de;
|
mod de;
|
||||||
mod ser;
|
mod ser;
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
use de::attribute::*;
|
use attribute::*;
|
||||||
use de::field_type::*;
|
use de::field_type::*;
|
||||||
use quote::Tokens;
|
use quote::Tokens;
|
||||||
use syn::Ident;
|
use syn::Ident;
|
||||||
|
|||||||
@ -1,9 +1,7 @@
|
|||||||
|
|
||||||
// pub mod attribute;
|
|
||||||
pub mod expand_struct;
|
pub mod expand_struct;
|
||||||
// pub mod field_type;
|
|
||||||
|
|
||||||
use de::attribute;
|
use attribute;
|
||||||
|
|
||||||
use proc_macro2::Span;
|
use proc_macro2::Span;
|
||||||
use quote;
|
use quote;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user