Remove useless Clone bound in IndexVec.
This commit is contained in:
parent
3a5d45f68c
commit
736fc96ff3
|
@ -695,9 +695,7 @@ impl<I: Idx, T> IndexVec<I, T> {
|
||||||
pub fn convert_index_type<Ix: Idx>(self) -> IndexVec<Ix, T> {
|
pub fn convert_index_type<Ix: Idx>(self) -> IndexVec<Ix, T> {
|
||||||
IndexVec { raw: self.raw, _marker: PhantomData }
|
IndexVec { raw: self.raw, _marker: PhantomData }
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
impl<I: Idx, T: Clone> IndexVec<I, T> {
|
|
||||||
/// Grows the index vector so that it contains an entry for
|
/// Grows the index vector so that it contains an entry for
|
||||||
/// `elem`; if that is already true, then has no
|
/// `elem`; if that is already true, then has no
|
||||||
/// effect. Otherwise, inserts new values as needed by invoking
|
/// effect. Otherwise, inserts new values as needed by invoking
|
||||||
|
@ -710,11 +708,6 @@ impl<I: Idx, T: Clone> IndexVec<I, T> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline]
|
|
||||||
pub fn resize(&mut self, new_len: usize, value: T) {
|
|
||||||
self.raw.resize(new_len, value)
|
|
||||||
}
|
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn resize_to_elem(&mut self, elem: I, fill_value: impl FnMut() -> T) {
|
pub fn resize_to_elem(&mut self, elem: I, fill_value: impl FnMut() -> T) {
|
||||||
let min_new_len = elem.index() + 1;
|
let min_new_len = elem.index() + 1;
|
||||||
|
@ -722,6 +715,13 @@ impl<I: Idx, T: Clone> IndexVec<I, T> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl<I: Idx, T: Clone> IndexVec<I, T> {
|
||||||
|
#[inline]
|
||||||
|
pub fn resize(&mut self, new_len: usize, value: T) {
|
||||||
|
self.raw.resize(new_len, value)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
impl<I: Idx, T: Ord> IndexVec<I, T> {
|
impl<I: Idx, T: Ord> IndexVec<I, T> {
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn binary_search(&self, value: &T) -> Result<I, I> {
|
pub fn binary_search(&self, value: &T) -> Result<I, I> {
|
||||||
|
|
Loading…
Reference in New Issue