Remove uint::max/min in favor if math::max/min
This commit is contained in:
parent
50d99ec32c
commit
5d6fe1a533
@ -3,6 +3,7 @@ import std::fs;
|
||||
import std::os_fs;
|
||||
import std::vec;
|
||||
import std::map;
|
||||
import std::math;
|
||||
import std::str;
|
||||
import std::uint;
|
||||
import metadata::cstore;
|
||||
@ -128,7 +129,7 @@ fn get_relative_to(abs1: fs::path, abs2: fs::path) -> fs::path {
|
||||
assert len1 > 0u;
|
||||
assert len2 > 0u;
|
||||
|
||||
let max_common_path = uint::min(len1, len2) - 1u;
|
||||
let max_common_path = math::min(len1, len2) - 1u;
|
||||
let start_idx = 0u;
|
||||
while start_idx < max_common_path
|
||||
&& split1[start_idx] == split2[start_idx] {
|
||||
|
@ -6,6 +6,7 @@ import std::box;
|
||||
import std::ufind;
|
||||
import std::map;
|
||||
import std::map::hashmap;
|
||||
import std::math;
|
||||
import std::option;
|
||||
import std::option::none;
|
||||
import std::option::some;
|
||||
@ -1812,7 +1813,7 @@ mod unify {
|
||||
// Unifies two sets.
|
||||
fn union(cx: @ctxt, set_a: uint, set_b: uint,
|
||||
variance: variance) -> union_result {
|
||||
ufind::grow(cx.vb.sets, uint::max(set_a, set_b) + 1u);
|
||||
ufind::grow(cx.vb.sets, math::max(set_a, set_b) + 1u);
|
||||
let root_a = ufind::find(cx.vb.sets, set_a);
|
||||
let root_b = ufind::find(cx.vb.sets, set_b);
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
use std;
|
||||
use rustc;
|
||||
|
||||
import std::{fs, io, getopts, vec, str, int, uint, option};
|
||||
import std::{fs, io, getopts, math, vec, str, int, uint, option};
|
||||
import std::getopts::{optopt, opt_present, opt_str};
|
||||
import std::io::stdout;
|
||||
|
||||
@ -242,9 +242,9 @@ fn check_variants_T<T>(
|
||||
let L = vec::len(things);
|
||||
|
||||
if L < 100u {
|
||||
under(uint::min(L, 20u)) {|i|
|
||||
under(math::min(L, 20u)) {|i|
|
||||
log_err "Replacing... #" + uint::str(i);
|
||||
under(uint::min(L, 30u)) {|j|
|
||||
under(math::min(L, 30u)) {|j|
|
||||
log_err "With... " + stringifier(@things[j]);
|
||||
let crate2 = @replacer(crate, i, things[j], cx.mode);
|
||||
// It would be best to test the *crate* for stability, but testing the
|
||||
|
@ -55,10 +55,6 @@ pure fn ge(x: uint, y: uint) -> bool { ret x >= y; }
|
||||
/* Predicate: gt */
|
||||
pure fn gt(x: uint, y: uint) -> bool { ret x > y; }
|
||||
|
||||
fn max(x: uint, y: uint) -> uint { if x > y { ret x; } ret y; }
|
||||
|
||||
fn min(x: uint, y: uint) -> uint { if x > y { ret y; } ret x; }
|
||||
|
||||
/*
|
||||
Function: range
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user