File tree 1 file changed +9
-2
lines changed
1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -2346,12 +2346,19 @@ impl<T:Eq> OwnedEqVector<T> for ~[T] {
2346
2346
}
2347
2347
}
2348
2348
2349
- pub trait MutableVector < T > {
2349
+ pub trait MutableVector < ' self , T > {
2350
+ fn mut_slice ( & mut self , start : uint , end : uint ) -> & ' self mut [ T ] ;
2351
+
2350
2352
unsafe fn unsafe_mut_ref ( & self , index : uint ) -> * mut T ;
2351
2353
unsafe fn unsafe_set ( & self , index : uint , val : T ) ;
2352
2354
}
2353
2355
2354
- impl < ' self , T > MutableVector < T > for & ' self mut [ T ] {
2356
+ impl < ' self , T > MutableVector < ' self , T > for & ' self mut [ T ] {
2357
+ #[ inline]
2358
+ fn mut_slice ( & mut self , start : uint , end : uint ) -> & ' self mut [ T ] {
2359
+ mut_slice ( * self , start, end)
2360
+ }
2361
+
2355
2362
#[ inline( always) ]
2356
2363
unsafe fn unsafe_mut_ref ( & self , index : uint ) -> * mut T {
2357
2364
let pair_ptr: & ( * mut T , uint ) = transmute ( self ) ;
You can’t perform that action at this time.
0 commit comments