From 333543ba1cb89c36ee622ef9467ee3fdb17308ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johanna=20S=C3=B6rng=C3=A5rd?= Date: Thu, 30 May 2024 16:13:24 +0200 Subject: [PATCH] Clerer prime_factorization example code --- src/cache.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cache.rs b/src/cache.rs index 80ce173..5ee05ba 100644 --- a/src/cache.rs +++ b/src/cache.rs @@ -160,7 +160,7 @@ impl Primes { /// # use const_primes::Primes; /// # const CACHE: Primes<3> = Primes::new(); /// // 1024 = 2^10 - /// assert_eq!(CACHE.prime_factorization(1024).collect::>(), &[(2, 10)]); + /// assert_eq!(CACHE.prime_factorization(1024).next(), Some((2, 10))); /// ``` /// 42 has 7 as a prime factor, but 7 is not in the cache: /// ```