@@ -694,9 +694,7 @@ impl<I: Idx, T> IndexVec<I, T> {
694
694
pub fn convert_index_type < Ix : Idx > ( self ) -> IndexVec < Ix , T > {
695
695
IndexVec { raw : self . raw , _marker : PhantomData }
696
696
}
697
- }
698
697
699
- impl < I : Idx , T : Clone > IndexVec < I , T > {
700
698
/// Grows the index vector so that it contains an entry for
701
699
/// `elem`; if that is already true, then has no
702
700
/// effect. Otherwise, inserts new values as needed by invoking
@@ -709,18 +707,20 @@ impl<I: Idx, T: Clone> IndexVec<I, T> {
709
707
}
710
708
}
711
709
712
- #[ inline]
713
- pub fn resize ( & mut self , new_len : usize , value : T ) {
714
- self . raw . resize ( new_len, value)
715
- }
716
-
717
710
#[ inline]
718
711
pub fn resize_to_elem ( & mut self , elem : I , fill_value : impl FnMut ( ) -> T ) {
719
712
let min_new_len = elem. index ( ) + 1 ;
720
713
self . raw . resize_with ( min_new_len, fill_value) ;
721
714
}
722
715
}
723
716
717
+ impl < I : Idx , T : Clone > IndexVec < I , T > {
718
+ #[ inline]
719
+ pub fn resize ( & mut self , new_len : usize , value : T ) {
720
+ self . raw . resize ( new_len, value)
721
+ }
722
+ }
723
+
724
724
impl < I : Idx , T : Ord > IndexVec < I , T > {
725
725
#[ inline]
726
726
pub fn binary_search ( & self , value : & T ) -> Result < I , I > {
0 commit comments