Skip to content

Commit 3bb54e8

Browse files
committed
Organize imports
Some modules already grouped std and non-std imports into the same block. Just do that consistently.
1 parent befadb7 commit 3bb54e8

File tree

4 files changed

+6
-9
lines changed

4 files changed

+6
-9
lines changed

src/fallback.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
use crate::strnom::{block_comment, skip_whitespace, whitespace, word_break, Cursor, PResult};
2+
use crate::{Delimiter, Punct, Spacing, TokenTree};
13
#[cfg(span_locations)]
24
use std::cell::RefCell;
35
#[cfg(span_locations)]
@@ -10,9 +12,6 @@ use std::path::Path;
1012
use std::path::PathBuf;
1113
use std::str::FromStr;
1214
use std::vec;
13-
14-
use crate::strnom::{block_comment, skip_whitespace, whitespace, word_break, Cursor, PResult};
15-
use crate::{Delimiter, Punct, Spacing, TokenTree};
1615
use unicode_xid::UnicodeXID;
1716

1817
#[derive(Clone)]

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1155,12 +1155,12 @@ impl fmt::Display for Literal {
11551155

11561156
/// Public implementation details for the `TokenStream` type, such as iterators.
11571157
pub mod token_stream {
1158+
use crate::{imp, TokenTree};
11581159
use std::fmt;
11591160
use std::marker;
11601161
use std::rc::Rc;
11611162

11621163
pub use crate::TokenStream;
1163-
use crate::{imp, TokenTree};
11641164

11651165
/// An iterator over `TokenStream`'s `TokenTree`s.
11661166
///

src/wrapper.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
use crate::detection::inside_proc_macro;
2+
use crate::{fallback, Delimiter, Punct, Spacing, TokenTree};
13
use std::fmt;
24
use std::iter;
35
use std::ops::RangeBounds;
@@ -6,9 +8,6 @@ use std::panic;
68
use std::path::PathBuf;
79
use std::str::FromStr;
810

9-
use crate::detection::inside_proc_macro;
10-
use crate::{fallback, Delimiter, Punct, Spacing, TokenTree};
11-
1211
#[derive(Clone)]
1312
pub(crate) enum TokenStream {
1413
Compiler(DeferredTokenStream),

tests/test.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
use std::str::{self, FromStr};
2-
31
use proc_macro2::{Ident, Literal, Spacing, Span, TokenStream, TokenTree};
2+
use std::str::{self, FromStr};
43

54
#[test]
65
fn idents() {

0 commit comments

Comments
 (0)