From ed47106242aca70fb13a5814da05a6cfd02c6043 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johanna=20S=C3=B6rng=C3=A5rd?= Date: Fri, 20 Oct 2023 15:37:05 +0200 Subject: [PATCH] Example --> Examples in new() and newlines around # Panics --- src/wrapper.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/wrapper.rs b/src/wrapper.rs index 7a41a5d..25f2d75 100644 --- a/src/wrapper.rs +++ b/src/wrapper.rs @@ -35,7 +35,7 @@ impl Primes { /// /// Uses a [segmented sieve of Eratosthenes](https://en.wikipedia.org/wiki/Sieve_of_Eratosthenes#Segmented_sieve). /// - /// # Example + /// # Examples /// Basic usage /// ``` /// # use const_primes::Primes; @@ -53,7 +53,9 @@ impl Primes { /// let primes = Primes::<5>::new(); /// assert_eq!(primes, [2, 3, 5, 7, 11]); /// ``` + /// /// # Panics + /// /// Panics if `N` is zero. In const contexts this will fail to compile /// ```compile_fail /// # use const_primes::Primes;