Skip to content

Commit 72fc798

Browse files
committed
Delete imports that are provided by 2021 edition prelude
1 parent 238e346 commit 72fc798

File tree

5 files changed

+1
-6
lines changed

5 files changed

+1
-6
lines changed

src/convert.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
pub(crate) fn usize_to_u32(u: usize) -> Option<u32> {
22
#[cfg(not(no_try_from))]
33
{
4-
use core::convert::TryFrom;
5-
64
u32::try_from(u).ok()
75
}
86

src/fallback.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ use core::cell::RefCell;
88
#[cfg(span_locations)]
99
use core::cmp;
1010
use core::fmt::{self, Debug, Display, Write};
11-
use core::iter::FromIterator;
1211
use core::mem::ManuallyDrop;
1312
use core::ops::RangeBounds;
1413
use core::ptr;

src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,6 @@ use crate::marker::Marker;
151151
use core::cmp::Ordering;
152152
use core::fmt::{self, Debug, Display};
153153
use core::hash::{Hash, Hasher};
154-
use core::iter::FromIterator;
155154
use core::ops::RangeBounds;
156155
use core::str::FromStr;
157156
use std::error::Error;

src/wrapper.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ use crate::detection::inside_proc_macro;
33
use crate::location::LineColumn;
44
use crate::{fallback, Delimiter, Punct, Spacing, TokenTree};
55
use core::fmt::{self, Debug, Display};
6-
use core::iter::FromIterator;
76
use core::ops::RangeBounds;
87
use core::str::FromStr;
98
use std::panic;

tests/test_fmt.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#![allow(clippy::from_iter_instead_of_collect)]
22

33
use proc_macro2::{Delimiter, Group, Ident, Span, TokenStream, TokenTree};
4-
use std::iter::{self, FromIterator};
4+
use std::iter;
55

66
#[test]
77
fn test_fmt_group() {

0 commit comments

Comments
 (0)