Skip to content

Commit b28f38a

Browse files
committed
Format with rustfmt 0.4.1
1 parent e3573b9 commit b28f38a

File tree

5 files changed

+189
-194
lines changed

5 files changed

+189
-194
lines changed

src/lib.rs

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
2626
// Proc-macro2 types in rustdoc of other crates get linked to here.
2727
#![doc(html_root_url = "https://docs.rs/proc-macro2/0.3.1")]
28-
2928
#![cfg_attr(feature = "nightly", feature(proc_macro))]
3029

3130
#[cfg(feature = "proc-macro")]
@@ -83,8 +82,9 @@ impl FromStr for TokenStream {
8382
type Err = LexError;
8483

8584
fn from_str(src: &str) -> Result<TokenStream, LexError> {
86-
let e = src.parse().map_err(|e| {
87-
LexError { inner: e, _marker: marker::PhantomData }
85+
let e = src.parse().map_err(|e| LexError {
86+
inner: e,
87+
_marker: marker::PhantomData,
8888
})?;
8989
Ok(TokenStream::_new(e))
9090
}
@@ -219,14 +219,20 @@ impl Span {
219219

220220
#[cfg(procmacro2_semver_exempt)]
221221
pub fn start(&self) -> LineColumn {
222-
let imp::LineColumn{ line, column } = self.inner.start();
223-
LineColumn { line: line, column: column }
222+
let imp::LineColumn { line, column } = self.inner.start();
223+
LineColumn {
224+
line: line,
225+
column: column,
226+
}
224227
}
225228

226229
#[cfg(procmacro2_semver_exempt)]
227230
pub fn end(&self) -> LineColumn {
228-
let imp::LineColumn{ line, column } = self.inner.end();
229-
LineColumn { line: line, column: column }
231+
let imp::LineColumn { line, column } = self.inner.end();
232+
LineColumn {
233+
line: line,
234+
column: column,
235+
}
230236
}
231237

232238
#[cfg(procmacro2_semver_exempt)]
@@ -559,16 +565,15 @@ pub mod token_stream {
559565
use std::marker;
560566
use std::rc::Rc;
561567

562-
use imp;
563-
use TokenTree;
564568
pub use TokenStream;
569+
use TokenTree;
570+
use imp;
565571

566572
pub struct IntoIter {
567573
inner: imp::TokenTreeIter,
568574
_marker: marker::PhantomData<Rc<()>>,
569575
}
570576

571-
572577
impl Iterator for IntoIter {
573578
type Item = TokenTree;
574579

0 commit comments

Comments
 (0)