Skip to content

Commit fb0473d

Browse files
committed
---
yaml --- r: 147242 b: refs/heads/try2 c: a43bf3f h: refs/heads/master v: v3
1 parent 037ed5e commit fb0473d

File tree

2 files changed

+3
-45
lines changed

2 files changed

+3
-45
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: f97040a93b7320af9963660b24a4b60b8bdd461a
8+
refs/heads/try2: a43bf3ff99c0c801c4524f0f96d8d57e758e1044
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/src/libstd/vec.rs

Lines changed: 2 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -2351,10 +2351,7 @@ pub mod raw {
23512351

23522352
/// Operations on `[u8]`
23532353
pub mod bytes {
2354-
use libc;
2355-
use num;
23562354
use vec::raw;
2357-
use vec;
23582355
use ptr;
23592356

23602357
/// A trait for operations on mutable operations on `[u8]`
@@ -2372,45 +2369,6 @@ pub mod bytes {
23722369
}
23732370
}
23742371

2375-
/// Bytewise string comparison
2376-
pub fn memcmp(a: &~[u8], b: &~[u8]) -> int {
2377-
let a_len = a.len();
2378-
let b_len = b.len();
2379-
let n = num::min(a_len, b_len) as libc::size_t;
2380-
let r = unsafe {
2381-
libc::memcmp(raw::to_ptr(*a) as *libc::c_void,
2382-
raw::to_ptr(*b) as *libc::c_void, n) as int
2383-
};
2384-
2385-
if r != 0 { r } else {
2386-
if a_len == b_len {
2387-
0
2388-
} else if a_len < b_len {
2389-
-1
2390-
} else {
2391-
1
2392-
}
2393-
}
2394-
}
2395-
2396-
/// Bytewise less than or equal
2397-
pub fn lt(a: &~[u8], b: &~[u8]) -> bool { memcmp(a, b) < 0 }
2398-
2399-
/// Bytewise less than or equal
2400-
pub fn le(a: &~[u8], b: &~[u8]) -> bool { memcmp(a, b) <= 0 }
2401-
2402-
/// Bytewise equality
2403-
pub fn eq(a: &~[u8], b: &~[u8]) -> bool { memcmp(a, b) == 0 }
2404-
2405-
/// Bytewise inequality
2406-
pub fn ne(a: &~[u8], b: &~[u8]) -> bool { memcmp(a, b) != 0 }
2407-
2408-
/// Bytewise greater than or equal
2409-
pub fn ge(a: &~[u8], b: &~[u8]) -> bool { memcmp(a, b) >= 0 }
2410-
2411-
/// Bytewise greater than
2412-
pub fn gt(a: &~[u8], b: &~[u8]) -> bool { memcmp(a, b) > 0 }
2413-
24142372
/**
24152373
* Copies data from one vector to another.
24162374
*
@@ -2419,7 +2377,7 @@ pub mod bytes {
24192377
#[inline]
24202378
pub fn copy_memory(dst: &mut [u8], src: &[u8]) {
24212379
// Bound checks are done at vec::raw::copy_memory.
2422-
unsafe { vec::raw::copy_memory(dst, src) }
2380+
unsafe { raw::copy_memory(dst, src) }
24232381
}
24242382

24252383
/**
@@ -2435,7 +2393,7 @@ pub mod bytes {
24352393
ptr::copy_memory(p_dst.offset(len_dst as int), p_src, len_src)
24362394
})
24372395
});
2438-
vec::raw::set_len(dst, old_len + src.len());
2396+
raw::set_len(dst, old_len + src.len());
24392397
}
24402398
}
24412399
}

0 commit comments

Comments
 (0)