Implement `Clone` for `CsrTripletIter` and `CscTripletIter`
This commit is contained in:
parent
0b89950fca
commit
86bde5ff1d
|
@ -625,6 +625,15 @@ pub struct CscTripletIter<'a, T> {
|
||||||
values_iter: Iter<'a, T>,
|
values_iter: Iter<'a, T>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl<'a, T> Clone for CscTripletIter<'a, T> {
|
||||||
|
fn clone(&self) -> Self {
|
||||||
|
CscTripletIter {
|
||||||
|
pattern_iter: self.pattern_iter.clone(),
|
||||||
|
values_iter: self.values_iter.clone(),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
impl<'a, T: Clone> CscTripletIter<'a, T> {
|
impl<'a, T: Clone> CscTripletIter<'a, T> {
|
||||||
/// Adapts the triplet iterator to return owned values.
|
/// Adapts the triplet iterator to return owned values.
|
||||||
///
|
///
|
||||||
|
|
|
@ -626,6 +626,15 @@ pub struct CsrTripletIter<'a, T> {
|
||||||
values_iter: Iter<'a, T>,
|
values_iter: Iter<'a, T>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl<'a, T> Clone for CsrTripletIter<'a, T> {
|
||||||
|
fn clone(&self) -> Self {
|
||||||
|
CsrTripletIter {
|
||||||
|
pattern_iter: self.pattern_iter.clone(),
|
||||||
|
values_iter: self.values_iter.clone(),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
impl<'a, T: Clone> CsrTripletIter<'a, T> {
|
impl<'a, T: Clone> CsrTripletIter<'a, T> {
|
||||||
/// Adapts the triplet iterator to return owned values.
|
/// Adapts the triplet iterator to return owned values.
|
||||||
///
|
///
|
||||||
|
|
Loading…
Reference in New Issue