Skip to content

Commit

Permalink
Add and "and more!" comment to Primes example (#58)
Browse files Browse the repository at this point in the history
* Update README.md

* Update lib.rs
  • Loading branch information
JSorngard authored Jun 24, 2024
1 parent 02bf2e3 commit 3aaba18
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ assert_eq!(PRIMES_LEQ_100, Some(25));

// Prime factorization:
assert_eq!(CACHE.prime_factorization(3072).collect(), &[(2, 10), (3, 1)])
// and more!

// If questions are asked about numbers
// outside the cache it returns None
Expand Down
1 change: 1 addition & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
//!
//! // Prime factorization
//! assert_eq!(CACHE.prime_factorization(3072).collect::<Vec<_>>(), &[(2, 10), (3, 1)]);
//! // and more!
//!
//! // If questions are asked about numbers outside the cache it returns None
//! assert!(CACHE.is_prime(1000).is_none());
Expand Down

0 comments on commit 3aaba18

Please sign in to comment.