@@ -694,9 +694,7 @@ impl<I: Idx, T> IndexVec<I, T> {
694694 pub fn convert_index_type < Ix : Idx > ( self ) -> IndexVec < Ix , T > {
695695 IndexVec { raw : self . raw , _marker : PhantomData }
696696 }
697- }
698697
699- impl < I : Idx , T : Clone > IndexVec < I , T > {
700698 /// Grows the index vector so that it contains an entry for
701699 /// `elem`; if that is already true, then has no
702700 /// effect. Otherwise, inserts new values as needed by invoking
@@ -709,18 +707,20 @@ impl<I: Idx, T: Clone> IndexVec<I, T> {
709707 }
710708 }
711709
712- #[ inline]
713- pub fn resize ( & mut self , new_len : usize , value : T ) {
714- self . raw . resize ( new_len, value)
715- }
716-
717710 #[ inline]
718711 pub fn resize_to_elem ( & mut self , elem : I , fill_value : impl FnMut ( ) -> T ) {
719712 let min_new_len = elem. index ( ) + 1 ;
720713 self . raw . resize_with ( min_new_len, fill_value) ;
721714 }
722715}
723716
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+
724724impl < I : Idx , T : Ord > IndexVec < I , T > {
725725 #[ inline]
726726 pub fn binary_search ( & self , value : & T ) -> Result < I , I > {
0 commit comments