@@ -118,15 +118,6 @@ pub fn capacity<T>(v: &const ~[T]) -> uint {
118
118
}
119
119
}
120
120
121
- // A botch to tide us over until core and std are fully demuted.
122
- #[ allow( missing_doc) ]
123
- pub fn uniq_len < T > ( v : & const ~[ T ] ) -> uint {
124
- unsafe {
125
- let v: & ~[ T ] = transmute ( v) ;
126
- as_const_buf ( * v, |_p, len| len)
127
- }
128
- }
129
-
130
121
/**
131
122
* Creates and initializes an owned vector.
132
123
*
@@ -1767,19 +1758,32 @@ pub mod traits {
1767
1758
}
1768
1759
}
1769
1760
1770
- impl < ' self , T > Container for & ' self const [ T ] {
1761
+ impl < ' self , T > Container for & ' self const [ T ] {
1771
1762
/// Returns true if a vector contains no elements
1772
1763
#[ inline]
1773
- fn is_empty ( & const self ) -> bool {
1764
+ fn is_empty ( & self ) -> bool {
1774
1765
as_const_buf ( * self , |_p, len| len == 0 u)
1775
1766
}
1776
1767
1777
1768
/// Returns the length of a vector
1778
1769
#[ inline]
1779
- fn len ( & const self ) -> uint {
1770
+ fn len ( & self ) -> uint {
1780
1771
as_const_buf ( * self , |_p, len| len)
1781
1772
}
1773
+ }
1774
+
1775
+ impl < T > Container for ~[ T ] {
1776
+ /// Returns true if a vector contains no elements
1777
+ #[ inline]
1778
+ fn is_empty ( & self ) -> bool {
1779
+ as_const_buf ( * self , |_p, len| len == 0 u)
1780
+ }
1782
1781
1782
+ /// Returns the length of a vector
1783
+ #[ inline]
1784
+ fn len ( & self ) -> uint {
1785
+ as_const_buf ( * self , |_p, len| len)
1786
+ }
1783
1787
}
1784
1788
1785
1789
#[ allow( missing_doc) ]
@@ -2615,23 +2619,6 @@ impl<A:Copy> old_iter::CopyableIter<A> for @[A] {
2615
2619
}
2616
2620
}
2617
2621
2618
- impl < ' self , A : Copy + Ord > old_iter:: CopyableOrderedIter < A > for & ' self [ A ] {
2619
- fn min ( & self ) -> A { old_iter:: min ( self ) }
2620
- fn max ( & self ) -> A { old_iter:: max ( self ) }
2621
- }
2622
-
2623
- // FIXME(#4148): This should be redundant
2624
- impl < A : Copy + Ord > old_iter:: CopyableOrderedIter < A > for ~[ A ] {
2625
- fn min ( & self ) -> A { old_iter:: min ( self ) }
2626
- fn max ( & self ) -> A { old_iter:: max ( self ) }
2627
- }
2628
-
2629
- // FIXME(#4148): This should be redundant
2630
- impl < A : Copy + Ord > old_iter:: CopyableOrderedIter < A > for @[ A ] {
2631
- fn min ( & self ) -> A { old_iter:: min ( self ) }
2632
- fn max ( & self ) -> A { old_iter:: max ( self ) }
2633
- }
2634
-
2635
2622
impl < A : Clone > Clone for ~[ A ] {
2636
2623
#[ inline]
2637
2624
fn clone ( & self ) -> ~[ A ] {
0 commit comments