Format with rustfmt 0.99.2
diff --git a/src/group.rs b/src/group.rs
index ca37545..3ffcad5 100644
--- a/src/group.rs
+++ b/src/group.rs
@@ -39,41 +39,37 @@
// Not public API.
#[doc(hidden)]
pub fn parse_parens(input: ParseStream) -> Result<Parens> {
- parse_delimited(input, Delimiter::Parenthesis)
- .map(|(span, content)| Parens {
- token: token::Paren(span),
- content: content,
- })
+ parse_delimited(input, Delimiter::Parenthesis).map(|(span, content)| Parens {
+ token: token::Paren(span),
+ content: content,
+ })
}
// Not public API.
#[doc(hidden)]
pub fn parse_braces(input: ParseStream) -> Result<Braces> {
- parse_delimited(input, Delimiter::Brace)
- .map(|(span, content)| Braces {
- token: token::Brace(span),
- content: content,
- })
+ parse_delimited(input, Delimiter::Brace).map(|(span, content)| Braces {
+ token: token::Brace(span),
+ content: content,
+ })
}
// Not public API.
#[doc(hidden)]
pub fn parse_brackets(input: ParseStream) -> Result<Brackets> {
- parse_delimited(input, Delimiter::Bracket)
- .map(|(span, content)| Brackets {
- token: token::Bracket(span),
- content: content,
- })
+ parse_delimited(input, Delimiter::Bracket).map(|(span, content)| Brackets {
+ token: token::Bracket(span),
+ content: content,
+ })
}
#[cfg(any(feature = "full", feature = "derive"))]
impl private {
pub fn parse_group(input: ParseStream) -> Result<Group> {
- parse_delimited(input, Delimiter::None)
- .map(|(span, content)| Group {
- token: token::Group(span),
- content: content,
- })
+ parse_delimited(input, Delimiter::None).map(|(span, content)| Group {
+ token: token::Group(span),
+ content: content,
+ })
}
}
@@ -81,8 +77,7 @@
input.step(|cursor| {
if let Some((content, span, rest)) = cursor.group(delimiter) {
let unexpected = private::get_unexpected(input);
- let content =
- private::new_parse_buffer(span, cursor.advance(content), unexpected);
+ let content = private::new_parse_buffer(span, cursor.advance(content), unexpected);
Ok(((span, content), rest))
} else {
let message = match delimiter {
diff --git a/src/parse.rs b/src/parse.rs
index 4f9b479..97c6240 100644
--- a/src/parse.rs
+++ b/src/parse.rs
@@ -205,7 +205,11 @@
}
impl private {
- pub fn new_parse_buffer(scope: Span, cursor: Cursor, unexpected: Rc<Cell<Option<Span>>>) -> ParseBuffer {
+ pub fn new_parse_buffer(
+ scope: Span,
+ cursor: Cursor,
+ unexpected: Rc<Cell<Option<Span>>>,
+ ) -> ParseBuffer {
let extend = unsafe { mem::transmute::<Cursor, Cursor<'static>>(cursor) };
ParseBuffer {
scope: scope,
diff --git a/src/parse_quote.rs b/src/parse_quote.rs
index 6b1bb52..62559cb 100644
--- a/src/parse_quote.rs
+++ b/src/parse_quote.rs
@@ -116,9 +116,9 @@
////////////////////////////////////////////////////////////////////////////////
// Any other types that we want `parse_quote!` to be able to parse.
+use punctuated::Punctuated;
#[cfg(any(feature = "full", feature = "derive"))]
use {attr, Attribute};
-use punctuated::Punctuated;
#[cfg(any(feature = "full", feature = "derive"))]
impl ParseQuote for Attribute {