@@ -671,9 +671,7 @@ impl<I: Idx, T> IndexVec<I, T> {
671
671
pub fn convert_index_type < Ix : Idx > ( self ) -> IndexVec < Ix , T > {
672
672
IndexVec { raw : self . raw , _marker : PhantomData }
673
673
}
674
- }
675
674
676
- impl < I : Idx , T : Clone > IndexVec < I , T > {
677
675
/// Grows the index vector so that it contains an entry for
678
676
/// `elem`; if that is already true, then has no
679
677
/// effect. Otherwise, inserts new values as needed by invoking
@@ -686,18 +684,20 @@ impl<I: Idx, T: Clone> IndexVec<I, T> {
686
684
}
687
685
}
688
686
689
- #[ inline]
690
- pub fn resize ( & mut self , new_len : usize , value : T ) {
691
- self . raw . resize ( new_len, value)
692
- }
693
-
694
687
#[ inline]
695
688
pub fn resize_to_elem ( & mut self , elem : I , fill_value : impl FnMut ( ) -> T ) {
696
689
let min_new_len = elem. index ( ) + 1 ;
697
690
self . raw . resize_with ( min_new_len, fill_value) ;
698
691
}
699
692
}
700
693
694
+ impl < I : Idx , T : Clone > IndexVec < I , T > {
695
+ #[ inline]
696
+ pub fn resize ( & mut self , new_len : usize , value : T ) {
697
+ self . raw . resize ( new_len, value)
698
+ }
699
+ }
700
+
701
701
impl < I : Idx , T : Ord > IndexVec < I , T > {
702
702
#[ inline]
703
703
pub fn binary_search ( & self , value : & T ) -> Result < I , I > {
0 commit comments