Skip to content

Commit 7826651

Browse files
committed
Tidy
1 parent fae3336 commit 7826651

File tree

4 files changed

+16
-14
lines changed

4 files changed

+16
-14
lines changed

src/libstd/rt/borrowck.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -147,15 +147,15 @@ impl DebugPrints for io::fd_t {
147147
fn write_hex(&self, mut i: uint) {
148148
let letters = ['0', '1', '2', '3', '4', '5', '6', '7', '8',
149149
'9', 'a', 'b', 'c', 'd', 'e', 'f'];
150-
static uint_nibbles: uint = ::uint::bytes << 1;
151-
let mut buffer = [0_u8, ..uint_nibbles+1];
152-
let mut c = uint_nibbles;
150+
static UINT_NIBBLES: uint = ::uint::bytes << 1;
151+
let mut buffer = [0_u8, ..UINT_NIBBLES+1];
152+
let mut c = UINT_NIBBLES;
153153
while c > 0 {
154154
c -= 1;
155155
buffer[c] = letters[i & 0xF] as u8;
156156
i >>= 4;
157157
}
158-
self.write(buffer.slice(0, uint_nibbles));
158+
self.write(buffer.slice(0, UINT_NIBBLES));
159159
}
160160

161161
unsafe fn write_cstr(&self, p: *c_char) {

src/libstd/rt/global_heap.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ pub unsafe fn exchange_malloc(td: *c_char, size: uintptr_t) -> *c_char {
8080
#[cfg(not(stage0), not(test))]
8181
#[lang="exchange_malloc"]
8282
#[inline]
83-
pub unsafe fn exchange_malloc(align: u32, size: uintptr_t) -> *c_char {
83+
pub unsafe fn exchange_malloc(_align: u32, size: uintptr_t) -> *c_char {
8484
malloc_raw(size as uint) as *c_char
8585
}
8686

src/libstd/rt/uv/net.rs

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ fn uv_ip_as_ip<T>(addr: UvIpAddr, f: &fn(IpAddr) -> T) -> T {
9797
let ip_str = str::from_bytes_slice(ip_name).trim_right_chars(&'\x00');
9898
let ip = match addr {
9999
UvIpv4(*) => {
100-
let ip: ~[u8] =
100+
let ip: ~[u8] =
101101
ip_str.split_iter('.')
102102
.transform(|s: &str| -> u8 { FromStr::from_str(s).unwrap() })
103103
.collect();
@@ -288,8 +288,10 @@ impl TcpWatcher {
288288
rtdebug!("connect_t: %x", connect_handle as uint);
289289
do ip_as_uv_ip(address) |addr| {
290290
let result = match addr {
291-
UvIpv4(addr) => uvll::tcp_connect(connect_handle, self.native_handle(), addr, connect_cb),
292-
UvIpv6(addr) => uvll::tcp_connect6(connect_handle, self.native_handle(), addr, connect_cb),
291+
UvIpv4(addr) => uvll::tcp_connect(connect_handle,
292+
self.native_handle(), addr, connect_cb),
293+
UvIpv6(addr) => uvll::tcp_connect6(connect_handle,
294+
self.native_handle(), addr, connect_cb),
293295
};
294296
assert_eq!(0, result);
295297
}
@@ -416,8 +418,10 @@ impl UdpWatcher {
416418
do ip_as_uv_ip(address) |addr| {
417419
let result = unsafe {
418420
match addr {
419-
UvIpv4(addr) => uvll::udp_send(req.native_handle(), self.native_handle(), [buf], addr, send_cb),
420-
UvIpv6(addr) => uvll::udp_send6(req.native_handle(), self.native_handle(), [buf], addr, send_cb),
421+
UvIpv4(addr) => uvll::udp_send(req.native_handle(),
422+
self.native_handle(), [buf], addr, send_cb),
423+
UvIpv6(addr) => uvll::udp_send6(req.native_handle(),
424+
self.native_handle(), [buf], addr, send_cb),
421425
}
422426
};
423427
assert_eq!(0, result);

src/libstd/vec.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,12 @@ use sys::size_of;
3232
use uint;
3333
use unstable::intrinsics;
3434
#[cfg(stage0)]
35-
use intrinsic::{get_tydesc, TyDesc};
35+
use intrinsic::{get_tydesc};
3636
#[cfg(not(stage0))]
37-
use unstable::intrinsics::{get_tydesc, contains_managed, TyDesc};
37+
use unstable::intrinsics::{get_tydesc, contains_managed};
3838
use vec;
3939
use util;
4040

41-
#[cfg(not(test))] use cmp::Equiv;
42-
4341
/// Returns true if two vectors have the same length
4442
pub fn same_length<T, U>(xs: &[T], ys: &[U]) -> bool {
4543
xs.len() == ys.len()

0 commit comments

Comments
 (0)