From 0c99d3caaf46411895f17a4529d7c22374563bac Mon Sep 17 00:00:00 2001 From: ripytide Date: Wed, 27 Dec 2023 12:58:26 +0000 Subject: [PATCH] correct the copy bit in the readme --- README.md | 9 ++++++--- src/lib.rs | 9 ++++++--- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 54d3eb8..710e72b 100644 --- a/README.md +++ b/README.md @@ -15,11 +15,14 @@ off [`BTreeMap`]. `no_std` is supported and should work with the default features. -## You must implement `Copy` +## `Copy` is partially required Due to implementation complications with non-`Copy` types the -datastructures currently require both the range type and the points -the ranges are over to be `Copy`. +datastructures currently require both the range type and the points the +ranges are over to be `Copy`. However, the value type used when using +the [`DiscreteRangeMap`] does not have to be `Copy`. In fact the only +required traits on the value type are sometimes `Clone` or `Eq` but only +for some methods so if in doubt check a methods trait bounds. ## Example using an Inclusive-Exclusive range diff --git a/src/lib.rs b/src/lib.rs index 82e5758..b5ebded 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -23,11 +23,14 @@ along with discrete_range_map. If not, see . //! //! `no_std` is supported and should work with the default features. //! -//! ## You must implement `Copy` +//! ## `Copy` is partially required //! //! Due to implementation complications with non-`Copy` types the -//! datastructures currently require both the range type and the points -//! the ranges are over to be `Copy`. +//! datastructures currently require both the range type and the points the +//! ranges are over to be `Copy`. However, the value type used when using +//! the [`DiscreteRangeMap`] does not have to be `Copy`. In fact the only +//! required traits on the value type are sometimes `Clone` or `Eq` but only +//! for some methods so if in doubt check a methods trait bounds. //! //! ## Example using an Inclusive-Exclusive range //!