Skip to content

Commit f35713d

Browse files
committed
---
yaml --- r: 148065 b: refs/heads/try2 c: 8236550 h: refs/heads/master i: 148063: ba3913a v: v3
1 parent b9c4782 commit f35713d

File tree

14 files changed

+26
-26
lines changed

14 files changed

+26
-26
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
55
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: 6be2bc817bbb70ac13a1c2bb9647e01e2a156127
8+
refs/heads/try2: 82365501043735dd8ec5eadaa5d30354cee19252
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/src/libextra/bitv.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ impl SmallBitv {
8080
self.bits |= 1<<i;
8181
}
8282
else {
83-
self.bits &= !(1<<i as uint);
83+
self.bits &= !(1<<i);
8484
}
8585
}
8686

branches/try2/src/libextra/ebml.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -647,7 +647,7 @@ pub mod writer {
647647
let cur_pos = self.writer.tell();
648648
self.writer.seek(last_size_pos as i64, io::SeekSet);
649649
let size = (cur_pos as uint - last_size_pos - 4);
650-
write_sized_vuint(self.writer, size as uint, 4u);
650+
write_sized_vuint(self.writer, size, 4u);
651651
self.writer.seek(cur_pos as i64, io::SeekSet);
652652

653653
debug!("End tag (size = {})", size);

branches/try2/src/libextra/test.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -929,8 +929,8 @@ fn calc_result(desc: &TestDesc, task_succeeded: bool) -> TestResult {
929929
impl ToJson for Metric {
930930
fn to_json(&self) -> json::Json {
931931
let mut map = ~TreeMap::new();
932-
map.insert(~"value", json::Number(self.value as f64));
933-
map.insert(~"noise", json::Number(self.noise as f64));
932+
map.insert(~"value", json::Number(self.value));
933+
map.insert(~"noise", json::Number(self.noise));
934934
json::Object(map)
935935
}
936936
}
@@ -1132,15 +1132,15 @@ impl BenchHarness {
11321132
let loop_start = precise_time_ns();
11331133
11341134
for p in samples.mut_iter() {
1135-
self.bench_n(n as u64, |x| f(x));
1135+
self.bench_n(n, |x| f(x));
11361136
*p = self.ns_per_iter() as f64;
11371137
};
11381138
11391139
stats::winsorize(samples, 5.0);
11401140
let summ = stats::Summary::new(samples);
11411141
11421142
for p in samples.mut_iter() {
1143-
self.bench_n(5 * n as u64, |x| f(x));
1143+
self.bench_n(5 * n, |x| f(x));
11441144
*p = self.ns_per_iter() as f64;
11451145
};
11461146

branches/try2/src/libextra/time.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -767,13 +767,13 @@ pub fn strptime(s: &str, format: &str) -> Result<Tm, ~str> {
767767

768768
let mut buf = [0];
769769
let c = match rdr.read(buf) {
770-
Some(..) => buf[0] as u8 as char,
770+
Some(..) => buf[0] as char,
771771
None => break
772772
};
773773
match c {
774774
'%' => {
775775
let ch = match rdr.read(buf) {
776-
Some(..) => buf[0] as u8 as char,
776+
Some(..) => buf[0] as char,
777777
None => break
778778
};
779779
match parse_type(s, pos, ch, &mut tm) {

branches/try2/src/libstd/cleanup.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ unsafe fn each_live_alloc(read_next_before: bool,
4242
let next_before = (*alloc).next;
4343
let uniq = (*alloc).ref_count == managed::RC_MANAGED_UNIQUE;
4444

45-
if !f(alloc as *mut raw::Box<()>, uniq) {
45+
if !f(alloc, uniq) {
4646
return false;
4747
}
4848

branches/try2/src/libstd/io/mod.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -725,7 +725,7 @@ pub trait Reader {
725725
///
726726
/// `u64`s are 8 bytes long.
727727
fn read_be_u64(&mut self) -> u64 {
728-
self.read_be_uint_n(8) as u64
728+
self.read_be_uint_n(8)
729729
}
730730

731731
/// Reads a big-endian `u32`.
@@ -746,7 +746,7 @@ pub trait Reader {
746746
///
747747
/// `i64`s are 8 bytes long.
748748
fn read_be_i64(&mut self) -> i64 {
749-
self.read_be_int_n(8) as i64
749+
self.read_be_int_n(8)
750750
}
751751

752752
/// Reads a big-endian `i32`.
@@ -785,7 +785,7 @@ pub trait Reader {
785785
///
786786
/// `u64`s are 8 bytes long.
787787
fn read_le_u64(&mut self) -> u64 {
788-
self.read_le_uint_n(8) as u64
788+
self.read_le_uint_n(8)
789789
}
790790

791791
/// Reads a little-endian `u32`.
@@ -806,7 +806,7 @@ pub trait Reader {
806806
///
807807
/// `i64`s are 8 bytes long.
808808
fn read_le_i64(&mut self) -> i64 {
809-
self.read_le_int_n(8) as i64
809+
self.read_le_int_n(8)
810810
}
811811

812812
/// Reads a little-endian `i32`.
@@ -846,7 +846,7 @@ pub trait Reader {
846846
/// `u8`s are 1 byte.
847847
fn read_u8(&mut self) -> u8 {
848848
match self.read_byte() {
849-
Some(b) => b as u8,
849+
Some(b) => b,
850850
None => 0
851851
}
852852
}

branches/try2/src/libstd/io/net/ip.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -153,11 +153,11 @@ impl<'a> Parser<'a> {
153153
let c = c as u8;
154154
// assuming radix is either 10 or 16
155155
if c >= '0' as u8 && c <= '9' as u8 {
156-
Some((c - '0' as u8) as u8)
156+
Some(c - '0' as u8)
157157
} else if radix > 10 && c >= 'a' as u8 && c < 'a' as u8 + (radix - 10) {
158-
Some((c - 'a' as u8 + 10) as u8)
158+
Some(c - 'a' as u8 + 10)
159159
} else if radix > 10 && c >= 'A' as u8 && c < 'A' as u8 + (radix - 10) {
160-
Some((c - 'A' as u8 + 10) as u8)
160+
Some(c - 'A' as u8 + 10)
161161
} else {
162162
None
163163
}

branches/try2/src/libstd/io/stdio.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ impl Reader for StdReader {
209209
io_error::cond.raise(standard_error(EndOfFile));
210210
None
211211
}
212-
Ok(amt) => Some(amt as uint),
212+
Ok(amt) => Some(amt),
213213
Err(e) => {
214214
io_error::cond.raise(e);
215215
None

branches/try2/src/libstd/num/strconv.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ pub fn float_to_str_bytes_common<T:NumCast+Zero+One+Eq+Ord+Float+Round+
344344
// round the remaining ones.
345345
if limit_digits && dig == digit_count {
346346
let ascii2value = |chr: u8| {
347-
char::to_digit(chr as char, radix).unwrap() as uint
347+
char::to_digit(chr as char, radix).unwrap()
348348
};
349349
let value2ascii = |val: uint| {
350350
char::from_digit(val, radix).unwrap() as u8

branches/try2/src/libstd/rand/distributions/normal.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ impl Rand for StandardNormal {
3232
fn rand<R:Rng>(rng: &mut R) -> StandardNormal {
3333
#[inline]
3434
fn pdf(x: f64) -> f64 {
35-
((-x*x/2.0) as f64).exp()
35+
(-x*x/2.0).exp()
3636
}
3737
#[inline]
3838
fn zero_case<R:Rng>(rng: &mut R, u: f64) -> f64 {

branches/try2/src/libstd/rt/global_heap.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ pub unsafe fn closure_exchange_malloc(td: *c_char, size: uintptr_t) -> *c_char {
7676
assert!(td.is_not_null());
7777

7878
let total_size = get_box_size(size, (*td).align);
79-
let p = malloc_raw(total_size as uint);
79+
let p = malloc_raw(total_size);
8080

8181
let alloc = p as *mut raw::Box<()>;
8282
(*alloc).type_desc = td;

branches/try2/src/libstd/str.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -901,7 +901,7 @@ pub fn utf16_chars(v: &[u16], f: |char|) {
901901
let mut c: u32 = (u - 0xD800_u16) as u32;
902902
c = c << 10;
903903
c |= (u2 - 0xDC00_u16) as u32;
904-
c |= 0x1_0000_u32 as u32;
904+
c |= 0x1_0000_u32;
905905
f(unsafe { cast::transmute(c) });
906906
i += 2u;
907907
}
@@ -987,7 +987,7 @@ pub mod raw {
987987
/// Create a Rust string from a *u8 buffer of the given length
988988
pub unsafe fn from_buf_len(buf: *u8, len: uint) -> ~str {
989989
let mut v: ~[u8] = vec::with_capacity(len);
990-
ptr::copy_memory(v.as_mut_ptr(), buf as *u8, len);
990+
ptr::copy_memory(v.as_mut_ptr(), buf, len);
991991
v.set_len(len);
992992

993993
assert!(is_utf8(v));

branches/try2/src/libstd/unstable/mutex.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@ impl Mutex {
6666
/// Creates a new mutex, with the lock/condition variable pre-initialized
6767
pub unsafe fn new() -> Mutex {
6868
Mutex {
69-
lock: atomics::AtomicUint::new(imp::init_lock() as uint),
70-
cond: atomics::AtomicUint::new(imp::init_cond() as uint),
69+
lock: atomics::AtomicUint::new(imp::init_lock()),
70+
cond: atomics::AtomicUint::new(imp::init_cond()),
7171
}
7272
}
7373

0 commit comments

Comments
 (0)