Skip to content

Commit

Permalink
update format
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcAntoine-Arnaud committed May 25, 2018
1 parent e691fba commit 9db3541
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 8 deletions.
5 changes: 3 additions & 2 deletions yaserde_derive/src/attribute.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

use proc_macro2::TokenTree;
use proc_macro2::Delimiter;
use proc_macro2::token_stream::IntoIter;
Expand All @@ -16,7 +15,9 @@ pub struct YaSerdeAttribute {
}

fn get_value(iter: &mut IntoIter) -> Option<String> {
if let (Some(TokenTree::Punct(operator)), Some(TokenTree::Literal(value))) = (iter.next(), iter.next()) {
if let (Some(TokenTree::Punct(operator)), Some(TokenTree::Literal(value))) =
(iter.next(), iter.next())
{
if operator.as_char() == '=' {
Some(value.to_string().replace("\"", ""))
} else {
Expand Down
2 changes: 1 addition & 1 deletion yaserde_derive/src/de/expand_enum.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use std::collections::BTreeMap;
use syn::Fields;
use syn::Ident;
use syn::DataEnum;
use proc_macro2::{TokenStream, Span};
use proc_macro2::{Span, TokenStream};

pub fn parse(
data_enum: &DataEnum,
Expand Down
2 changes: 1 addition & 1 deletion yaserde_derive/src/de/expand_struct.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use quote::TokenStreamExt;
use std::collections::BTreeMap;
use syn::Ident;
use syn::DataStruct;
use proc_macro2::{TokenStream, Span};
use proc_macro2::{Span, TokenStream};

pub fn parse(
data_struct: &DataStruct,
Expand Down
2 changes: 1 addition & 1 deletion yaserde_derive/src/de/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ pub mod expand_enum;
pub mod expand_struct;

use attribute;
use proc_macro2::{TokenStream, Span};
use proc_macro2::{Span, TokenStream};
use syn;
use syn::Ident;

Expand Down
2 changes: 1 addition & 1 deletion yaserde_derive/src/ser/expand_enum.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use std::collections::BTreeMap;
use syn::Fields;
use syn::Ident;
use syn::DataEnum;
use proc_macro2::{TokenStream, Span};
use proc_macro2::{Span, TokenStream};

pub fn serialize(
data_enum: &DataEnum,
Expand Down
2 changes: 1 addition & 1 deletion yaserde_derive/src/ser/expand_struct.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use quote::TokenStreamExt;
use std::collections::BTreeMap;
use syn::Ident;
use syn::DataStruct;
use proc_macro2::{TokenStream, Span};
use proc_macro2::{Span, TokenStream};
use std::string::ToString;

pub fn serialize(
Expand Down
2 changes: 1 addition & 1 deletion yaserde_derive/src/ser/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ pub mod expand_enum;
pub mod expand_struct;

use attribute;
use proc_macro2::{TokenStream, Span};
use proc_macro2::{Span, TokenStream};
use syn;
use syn::Ident;

Expand Down

0 comments on commit 9db3541

Please sign in to comment.