Skip to content

Commit 12340b2

Browse files
committed
Use std::iter::Fuse
1 parent c370f52 commit 12340b2

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/krylov/arnoldi.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
use super::*;
2+
use std::iter::Fuse;
23

34
pub struct Arnoldi<A, S, F, Ortho>
45
where
@@ -19,15 +20,15 @@ where
1920
F: Fn(&mut ArrayBase<S, Ix1>),
2021
Ortho: Orthogonalizer<Elem = A>,
2122
{
22-
pub fn new(a: F, v: ArrayBase<S, Ix1>, ortho: Ortho) -> Self {
23-
Arnoldi { a, v, ortho }
23+
pub fn new(a: F, v: ArrayBase<S, Ix1>, ortho: Ortho) -> Fuse<Self> {
24+
Iterator::fuse(Arnoldi { a, v, ortho })
2425
}
2526
}
2627

2728
impl<A, S, F, Ortho> Iterator for Arnoldi<A, S, F, Ortho>
2829
where
2930
A: Scalar,
30-
S: DataMut<Elem = A> + DataClone,
31+
S: DataMut<Elem = A>,
3132
F: Fn(&mut ArrayBase<S, Ix1>),
3233
Ortho: Orthogonalizer<Elem = A>,
3334
{

0 commit comments

Comments
 (0)