提交 9fc08332 编写于 作者: L Linus Färnstrand

Stop accessing module level int consts via crate::<Ty>

上级 8ce3f840
......@@ -2,7 +2,6 @@
use crate::fmt;
use crate::intrinsics;
use crate::ops::{Add, AddAssign, Try};
use crate::usize;
use super::{from_fn, LoopState};
use super::{DoubleEndedIterator, ExactSizeIterator, FusedIterator, Iterator, TrustedLen};
......
use crate::convert::TryFrom;
use crate::mem;
use crate::ops::{self, Add, Sub, Try};
use crate::usize;
use super::{FusedIterator, TrustedLen};
......
use crate::fmt;
use crate::marker;
use crate::usize;
use super::{FusedIterator, TrustedLen};
......
......@@ -123,7 +123,6 @@
)]
pub use self::decoder::{decode, DecodableFloat, Decoded, FullDecoded};
use crate::i16;
pub mod decoder;
pub mod estimator;
......
......@@ -34,7 +34,7 @@ fn repeat_byte(b: u8) -> usize {
#[cfg(not(target_pointer_width = "16"))]
#[inline]
fn repeat_byte(b: u8) -> usize {
(b as usize) * (crate::usize::MAX / 255)
(b as usize) * (usize::MAX / 255)
}
/// Returns the first index matching the byte `x` in `text`.
......
......@@ -28,7 +28,6 @@
use crate::cmp::Ordering::{self, Equal, Greater, Less};
use crate::fmt;
use crate::intrinsics::{assume, exact_div, is_aligned_and_not_null, unchecked_sub};
use crate::isize;
use crate::iter::*;
use crate::marker::{self, Copy, Send, Sized, Sync};
use crate::mem;
......
......@@ -12,7 +12,6 @@
use crate::cmp;
use crate::fmt;
use crate::slice::memchr;
use crate::usize;
// Pattern
......
......@@ -12,9 +12,9 @@
//! assert_eq!(Duration::new(5, 0), Duration::from_secs(5));
//! ```
use crate::fmt;
use crate::iter::Sum;
use crate::ops::{Add, AddAssign, Div, DivAssign, Mul, MulAssign, Sub, SubAssign};
use crate::{fmt, u64};
const NANOS_PER_SEC: u32 = 1_000_000_000;
const NANOS_PER_MILLI: u32 = 1_000_000;
......
......@@ -1062,7 +1062,7 @@ fn new() -> ThreadId {
// If we somehow use up all our bits, panic so that we're not
// covering up subtle bugs of IDs being reused.
if COUNTER == crate::u64::MAX {
if COUNTER == u64::MAX {
panic!("failed to generate unique thread ID: bitspace exhausted");
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册