Format with rustfmt 1.0.0-nightly
diff --git a/codegen/src/main.rs b/codegen/src/main.rs
index c4c8b8f..25d72ca 100644
--- a/codegen/src/main.rs
+++ b/codegen/src/main.rs
@@ -19,8 +19,8 @@
extern crate proc_macro2;
#[macro_use]
extern crate quote;
-extern crate syn;
extern crate rustfmt_nightly as rustfmt;
+extern crate syn;
use failure::{err_msg, Error};
use proc_macro2::{Span, TokenStream};
@@ -46,9 +46,7 @@
const TERMINAL_TYPES: &[&str] = &["Span", "Ident"];
fn path_eq(a: &syn::Path, b: &str) -> bool {
- a.leading_colon.is_none()
- && a.segments.len() == 1
- && a.segments[0].ident == b
+ a.leading_colon.is_none() && a.segments.len() == 1 && a.segments[0].ident == b
}
fn get_features(attrs: &[Attribute], mut features: TokenStream) -> TokenStream {
@@ -197,10 +195,11 @@
fn peek_tag(input: ParseStream, tag: &str) -> bool {
let ahead = input.fork();
- ahead.parse::<Token![#]>().is_ok() && ahead
- .parse::<Ident>()
- .map(|ident| ident == tag)
- .unwrap_or(false)
+ ahead.parse::<Token![#]>().is_ok()
+ && ahead
+ .parse::<Ident>()
+ .map(|ident| ident == tag)
+ .unwrap_or(false)
}
// Parses #full - returns #[cfg(feature = "full")] if it is present, and
@@ -995,7 +994,8 @@
write!(
file,
"// THIS FILE IS AUTOMATICALLY GENERATED; DO NOT EDIT\n\n"
- ).unwrap();
+ )
+ .unwrap();
let mut config = rustfmt::Config::default();
config.set().emit_mode(rustfmt::EmitMode::Stdout);
config.set().verbose(rustfmt::Verbosity::Quiet);