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