@@ -266,6 +266,7 @@ pub pure fn slice<T: Copy>(v: &[const T], start: uint, end: uint) -> ~[T] {
266
266
}
267
267
268
268
/// Return a slice that points into another slice.
269
+ #[ inline( always) ]
269
270
pub pure fn view < T > ( v : & r/[ T ] , start : uint , end : uint ) -> & r/[ T ] {
270
271
assert ( start <= end) ;
271
272
assert ( end <= len ( v) ) ;
@@ -279,6 +280,7 @@ pub pure fn view<T>(v: &r/[T], start: uint, end: uint) -> &r/[T] {
279
280
}
280
281
281
282
/// Return a slice that points into another slice.
283
+ #[ inline( always) ]
282
284
pub pure fn mut_view < T > ( v : & r/[ mut T ] , start : uint , end : uint ) -> & r/[ mut T ] {
283
285
assert ( start <= end) ;
284
286
assert ( end <= len ( v) ) ;
@@ -292,6 +294,7 @@ pub pure fn mut_view<T>(v: &r/[mut T], start: uint, end: uint) -> &r/[mut T] {
292
294
}
293
295
294
296
/// Return a slice that points into another slice.
297
+ #[ inline( always) ]
295
298
pub pure fn const_view < T > ( v : & r/[ const T ] , start : uint ,
296
299
end : uint ) -> & r/[ const T ] {
297
300
assert ( start <= end) ;
@@ -305,6 +308,8 @@ pub pure fn const_view<T>(v: &r/[const T], start: uint,
305
308
}
306
309
}
307
310
311
+ /// Copies
312
+
308
313
/// Split the vector `v` by applying each element against the predicate `f`.
309
314
pub fn split < T : Copy > ( v : & [ T ] , f : fn ( t : & T ) -> bool ) -> ~[ ~[ T ] ] {
310
315
let ln = len ( v) ;
@@ -2127,6 +2132,7 @@ pub mod raw {
2127
2132
* Copies `count` bytes from `src` to `dst`. The source and destination
2128
2133
* may overlap.
2129
2134
*/
2135
+ #[ inline( always) ]
2130
2136
pub unsafe fn copy_memory < T > ( dst : & [ mut T ] , src : & [ const T ] ,
2131
2137
count : uint ) {
2132
2138
assert dst. len ( ) >= count;
@@ -2193,6 +2199,7 @@ pub mod bytes {
2193
2199
* Copies `count` bytes from `src` to `dst`. The source and destination
2194
2200
* may overlap.
2195
2201
*/
2202
+ #[ inline( always) ]
2196
2203
pub fn copy_memory ( dst : & [ mut u8] , src : & [ const u8 ] , count : uint ) {
2197
2204
// Bound checks are done at vec::raw::copy_memory.
2198
2205
unsafe { vec:: raw:: copy_memory ( dst, src, count) }
0 commit comments