diff --git a/rust/src/include/fibonacci.rs b/rust/src/include/fibonacci.rs index 5a033013..c49480be 100644 --- a/rust/src/include/fibonacci.rs +++ b/rust/src/include/fibonacci.rs @@ -2,14 +2,12 @@ use std::ops::{Add,Mul}; use num_traits::{one,zero,One,Zero}; -use crate::include::iter_cache::cache_iterator; - pub fn fib() -> impl Iterator where I: Copy + Zero + One + Add + 'static { - return cache_iterator(Fibonacci::::new()); + return Fibonacci::::new(); } pub fn fib_by_3() -> impl Iterator where I: Copy + Zero + One + Add + Mul + 'static { - return cache_iterator(FibonacciBy3::::new()); + return FibonacciBy3::::new(); } #[derive(Clone, Copy, Debug, Hash)] diff --git a/rust/src/include/primes.rs b/rust/src/include/primes.rs index 52fb7c5f..32669cf2 100644 --- a/rust/src/include/primes.rs +++ b/rust/src/include/primes.rs @@ -5,8 +5,6 @@ use std::ops::{Add,Div,Mul,Rem}; use num_traits::{one,zero,One,Zero}; -use crate::include::iter_cache::cache_iterator; - #[derive(Clone, Debug)] pub struct Eratosthenes where I: Hash { sieve: HashMap>, @@ -62,7 +60,7 @@ impl Iterator for Eratosthenes where I: Hash + One + Zero + Add + Mul + Or } pub fn primes() -> impl Iterator where I: Hash + One + Zero + Add + Mul + Ord + Copy + 'static { - return cache_iterator(Eratosthenes::new()); + return Eratosthenes::new(); } pub fn primes_until(x: I) -> impl Iterator where I: Hash + One + Zero + Add + Mul + Ord + Copy + 'static {