Skip to content

Commit c428c0e

Browse files
committed
Use associated constants directly on primitive types instead of modules
1 parent 6e07d2d commit c428c0e

File tree

5 files changed

+4
-5
lines changed

5 files changed

+4
-5
lines changed

crates/cargo-test-support/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,6 @@ use std::path::{Path, PathBuf};
118118
use std::process::{Command, Output};
119119
use std::str;
120120
use std::time::{self, Duration};
121-
use std::usize;
122121

123122
use cargo::util::{is_ci, CargoResult, ProcessBuilder, ProcessError, Rustc};
124123
use serde_json::{self, Value};

crates/resolver-tests/tests/resolve.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ proptest! {
2525
0
2626
} else {
2727
// but that local builds will give a small clear test case.
28-
std::u32::MAX
28+
u32::MAX
2929
},
3030
result_cache: prop::test_runner::basic_result_cache,
3131
.. ProptestConfig::default()

src/cargo/core/resolver/conflict_cache.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ impl ConflictCache {
175175
dep: &Dependency,
176176
must_contain: Option<PackageId>,
177177
) -> Option<&ConflictMap> {
178-
let out = self.find(dep, &|id| cx.is_active(id), must_contain, std::usize::MAX);
178+
let out = self.find(dep, &|id| cx.is_active(id), must_contain, usize::MAX);
179179
if cfg!(debug_assertions) {
180180
if let Some(c) = &out {
181181
assert!(cx.is_conflicting(None, c).is_some());

tests/testsuite/standard_lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ fn lib_nostd() {
297297
r#"
298298
#![no_std]
299299
pub fn foo() {
300-
assert_eq!(core::u8::MIN, 0);
300+
assert_eq!(u8::MIN, 0);
301301
}
302302
"#,
303303
)

tests/testsuite/test.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ fn cargo_test_overflow_checks() {
129129
use std::panic;
130130
pub fn main() {
131131
let r = panic::catch_unwind(|| {
132-
[1, i32::max_value()].iter().sum::<i32>();
132+
[1, i32::MAX].iter().sum::<i32>();
133133
});
134134
assert!(r.is_err());
135135
}"#,

0 commit comments

Comments
 (0)