Merge pull request #1287 from mohe2015/triplet-iter-clone
Implement `Clone` for `CsrTripletIter` and `CscTripletIter`
This commit is contained in:
commit
8c6f14fcd0
|
@ -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