Skip to content

Commit 4f8bc0b

Browse files
committed
---
yaml --- r: 49838 b: refs/heads/auto c: c88ce30 h: refs/heads/master v: v3
1 parent 75bc98d commit 4f8bc0b

File tree

3 files changed

+15
-2
lines changed

3 files changed

+15
-2
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@ refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0
1414
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1515
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1616
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
17-
refs/heads/auto: e9a0db6abd40913f3b366a62ebf0f59adac57bb6
17+
refs/heads/auto: c88ce30c485b8df5f6dfa55d216c19c10cafe5dd
1818
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167

branches/auto/src/libcore/cell.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ use prelude::*;
1515
///
1616
/// Similar to a mutable option type, but friendlier.
1717
18-
#[deriving_eq]
1918
pub struct Cell<T> {
2019
mut value: Option<T>
2120
}

branches/auto/src/libcore/vec.rs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2145,6 +2145,20 @@ pub mod raw {
21452145
f(*v)
21462146
}
21472147

2148+
/**
2149+
* Form a slice from a pointer and length (as a number of units,
2150+
* not bytes).
2151+
*/
2152+
#[inline(always)]
2153+
pub unsafe fn mut_buf_as_slice<T,U>(p: *mut T,
2154+
len: uint,
2155+
f: &fn(v: &mut [T]) -> U) -> U {
2156+
let pair = (p, len * sys::nonzero_size_of::<T>());
2157+
let v : *(&blk/mut [T]) =
2158+
::cast::reinterpret_cast(&addr_of(&pair));
2159+
f(*v)
2160+
}
2161+
21482162
/**
21492163
* Unchecked vector indexing.
21502164
*/

0 commit comments

Comments
 (0)