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 @@ -2347,12 +2347,19 @@ impl<T:Eq> OwnedEqVector<T> for ~[T] {
2347
2347
}
2348
2348
}
2349
2349
2350
- pub trait MutableVector < T > {
2350
+ pub trait MutableVector < ' self , T > {
2351
+ fn mut_slice ( & mut self , start : uint , end : uint ) -> & ' self mut [ T ] ;
2352
+
2351
2353
unsafe fn unsafe_mut_ref ( & self , index : uint ) -> * mut T ;
2352
2354
unsafe fn unsafe_set ( & self , index : uint , val : T ) ;
2353
2355
}
2354
2356
2355
- impl < ' self , T > MutableVector < T > for & ' self mut [ T ] {
2357
+ impl < ' self , T > MutableVector < ' self , T > for & ' self mut [ T ] {
2358
+ #[ inline]
2359
+ fn mut_slice ( & mut self , start : uint , end : uint ) -> & ' self mut [ T ] {
2360
+ mut_slice ( * self , start, end)
2361
+ }
2362
+
2356
2363
#[ inline( always) ]
2357
2364
unsafe fn unsafe_mut_ref ( & self , index : uint ) -> * mut T {
2358
2365
let pair_ptr: & ( * mut T , uint ) = transmute ( self ) ;
You can’t perform that action at this time.
0 commit comments