From dc0db358abe19481e475e10c32149b53370f1a1c Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Thu, 30 May 2024 05:57:31 +0200 Subject: Merging upstream version 1.72.1+dfsg1. Signed-off-by: Daniel Baumann --- vendor/proptest/src/collection.rs | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'vendor/proptest/src/collection.rs') diff --git a/vendor/proptest/src/collection.rs b/vendor/proptest/src/collection.rs index 90d04977e..ce27991d7 100644 --- a/vendor/proptest/src/collection.rs +++ b/vendor/proptest/src/collection.rs @@ -77,20 +77,23 @@ impl SizeRange { self.with(Default::default()) } - pub(crate) fn start(&self) -> usize { + /// The lower bound of the range (inclusive). + pub fn start(&self) -> usize { self.0.start } /// Extract the ends `[low, high]` of a `SizeRange`. - pub(crate) fn start_end_incl(&self) -> (usize, usize) { + pub fn start_end_incl(&self) -> (usize, usize) { (self.start(), self.end_incl()) } - pub(crate) fn end_incl(&self) -> usize { + /// The upper bound of the range (inclusive). + pub fn end_incl(&self) -> usize { self.0.end - 1 } - pub(crate) fn end_excl(&self) -> usize { + /// The upper bound of the range (exclusive). + pub fn end_excl(&self) -> usize { self.0.end } @@ -328,6 +331,7 @@ impl statics::FilterFn> for MinSize { opaque_strategy_wrapper! { {#[cfg(feature = "std")]} + {#[cfg_attr(docsrs, doc(cfg(feature = "std")))]} /// Strategy to create `HashSet`s with a length in a certain range. /// /// Created by the `hash_set()` function in the same module. @@ -349,6 +353,7 @@ opaque_strategy_wrapper! { /// has at least the minimum number of elements, in case `element` should /// produce duplicate values. #[cfg(feature = "std")] +#[cfg_attr(docsrs, doc(cfg(feature = "std")))] pub fn hash_set( element: T, size: impl Into, @@ -431,6 +436,7 @@ impl statics::FilterFn> for MinSize { opaque_strategy_wrapper! { {#[cfg(feature = "std")]} + {#[cfg_attr(docsrs, doc(cfg(feature = "std")))]} /// Strategy to create `HashMap`s with a length in a certain range. /// /// Created by the `hash_map()` function in the same module. @@ -457,6 +463,7 @@ opaque_strategy_wrapper! { /// has at least the minimum number of elements, in case `key` should produce /// duplicate values. #[cfg(feature = "std")] +#[cfg_attr(docsrs, doc(cfg(feature = "std")))] pub fn hash_map( key: K, value: V, -- cgit v1.2.3