Skip to content

Commit efddaf0

Browse files
committed
---
yaml --- r: 50590 b: refs/heads/try c: c88ce30 h: refs/heads/master v: v3
1 parent 34ab753 commit efddaf0

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
@@ -2,7 +2,7 @@
22
refs/heads/master: 5f13e9ccc2e3328d4cd8ca49f84e6840dd998346
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: f7a2371c176663d59062ec5158f39faecba45768
5-
refs/heads/try: e9a0db6abd40913f3b366a62ebf0f59adac57bb6
5+
refs/heads/try: c88ce30c485b8df5f6dfa55d216c19c10cafe5dd
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c

branches/try/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/try/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)