File tree Expand file tree Collapse file tree 3 files changed +15
-2
lines changed
branches/auto/src/libcore Expand file tree Collapse file tree 3 files changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -14,5 +14,5 @@ refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0
14
14
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
15
15
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
16
16
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
17
- refs/heads/auto: e9a0db6abd40913f3b366a62ebf0f59adac57bb6
17
+ refs/heads/auto: c88ce30c485b8df5f6dfa55d216c19c10cafe5dd
18
18
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
Original file line number Diff line number Diff line change @@ -15,7 +15,6 @@ use prelude::*;
15
15
///
16
16
/// Similar to a mutable option type, but friendlier.
17
17
18
- #[ deriving_eq]
19
18
pub struct Cell < T > {
20
19
mut value : Option < T >
21
20
}
Original file line number Diff line number Diff line change @@ -2145,6 +2145,20 @@ pub mod raw {
2145
2145
f ( * v)
2146
2146
}
2147
2147
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
+
2148
2162
/**
2149
2163
* Unchecked vector indexing.
2150
2164
*/
You can’t perform that action at this time.
0 commit comments