superset_map

B-tree-backed map whose keys are distinct supersets.
git clone https://git.philomathiclife.com/repos/superset_map
Log | Files | Refs | README

commit 1acebd4c8a10b8658b9e54b4ec433b7ea8a32f47
parent 40fe779f4995e9bf4ae76ab1e0ad28f95e478faf
Author: Zack Newman <zack@philomathiclife.com>
Date:   Mon, 28 Aug 2023 18:13:51 -0600

update deps. small doc fixes.

Diffstat:
MCargo.toml | 4++--
MREADME.md | 4++--
Msrc/lib.rs | 9++++++++-
Msrc/superset_map.rs | 8++++----
Msrc/superset_set.rs | 8++++----
5 files changed, 20 insertions(+), 13 deletions(-)

diff --git a/Cargo.toml b/Cargo.toml @@ -10,14 +10,14 @@ name = "superset_map" readme = "README.md" repository = "https://git.philomathiclife.com/repos/superset_map/" rust-version = "1.69" -version = "0.1.0" +version = "0.1.1" [lib] name = "superset_map" path = "src/lib.rs" [dependencies] -zfc = { version = "0.1.0", default-features = false } +zfc = { version = "0.1.1", default-features = false } [dev-dependencies] num-bigint = { version = "0.4.4", default-features = false } diff --git a/README.md b/README.md @@ -136,5 +136,5 @@ The crates are only tested on the `x86_64-unknown-linux-gnu` and `x86_64-unknown they should work on any [Tier 1 with Host Tools](https://doc.rust-lang.org/beta/rustc/platform-support.html) target. -Version `1.69.0` or newer of nightly `rustc` is required. Once `BTreeMap` -[cursors are stablilized](https://github.com/rust-lang/rust/issues/107540), stable `rustc` will work. +Version `1.69.0` or newer of nightly `rustc` is required. Once +[`BTreeMap` cursors are stablilized](https://github.com/rust-lang/rust/issues/107540), stable `rustc` will work. diff --git a/src/lib.rs b/src/lib.rs @@ -6,6 +6,9 @@ //! where only supersets are stored. This can be useful when the keys don't fit well or at all with the concept of //! [`RangeBounds`](https://doc.rust-lang.org/stable/core/ops/trait.RangeBounds.html). //! +//! Version `1.69.0` or newer of nightly `rustc` is required. Once +//! [`BTreeMap` cursors are stabilized](https://github.com/rust-lang/rust/issues/107540), stable `rustc` will work. +//! //! ## Example //! //! ```rust @@ -144,7 +147,11 @@ clippy::style, clippy::suspicious )] -#![allow(clippy::blanket_clippy_restriction_lints, clippy::pub_use)] +#![allow( + clippy::blanket_clippy_restriction_lints, + clippy::needless_doctest_main, + clippy::pub_use +)] use zfc::Set; /// A map of keys and values where the keys implement [`SetOrd`]. The map is backed by a B-tree. pub mod superset_map; diff --git a/src/superset_map.rs b/src/superset_map.rs @@ -522,7 +522,7 @@ where /// The method does no guarding against overflows, so the removal of more than `usize::MAX` elements either produces the wrong result or panics. If debug assertions are enabled, a panic is guaranteed. /// # Panics /// - /// This function might panic if then number of elements removed is greater than `usize::MAX`. + /// This function might panic if the number of elements removed is greater than `usize::MAX`. #[inline] #[allow(clippy::arithmetic_side_effects)] pub fn remove_proper_subsets<Q>(&mut self, key: &Q) -> usize @@ -549,7 +549,7 @@ where /// The method does no guarding against overflows, so the removal of more than `usize::MAX` elements either produces the wrong result or panics. If debug assertions are enabled, a panic is guaranteed. /// # Panics /// - /// This function might panic if then number of elements removed is greater than `usize::MAX`. + /// This function might panic if the number of elements removed is greater than `usize::MAX`. #[inline] #[allow(clippy::arithmetic_side_effects)] pub fn remove_proper_supersets<Q>(&mut self, key: &Q) -> usize @@ -576,7 +576,7 @@ where /// The method does no guarding against overflows, so the removal of more than `usize::MAX` elements either produces the wrong result or panics. If debug assertions are enabled, a panic is guaranteed. /// # Panics /// - /// This function might panic if then number of elements removed is greater than `usize::MAX`. + /// This function might panic if the number of elements removed is greater than `usize::MAX`. #[inline] #[allow(clippy::arithmetic_side_effects)] pub fn remove_subsets<Q>(&mut self, key: &Q) -> usize @@ -614,7 +614,7 @@ where /// The method does no guarding against overflows, so the removal of more than `usize::MAX` elements either produces the wrong result or panics. If debug assertions are enabled, a panic is guaranteed. /// # Panics /// - /// This function might panic if then number of elements removed is greater than `usize::MAX`. + /// This function might panic if the number of elements removed is greater than `usize::MAX`. #[inline] #[allow(clippy::arithmetic_side_effects)] pub fn remove_supersets<Q>(&mut self, key: &Q) -> usize diff --git a/src/superset_set.rs b/src/superset_set.rs @@ -523,7 +523,7 @@ where /// The method does no guarding against overflows, so the removal of more than `usize::MAX` elements either produces the wrong result or panics. If debug assertions are enabled, a panic is guaranteed. /// # Panics /// - /// This function might panic if then number of elements removed is greater than `usize::MAX`. + /// This function might panic if the number of elements removed is greater than `usize::MAX`. #[inline] pub fn remove_proper_subsets<Q>(&mut self, value: &Q) -> usize where @@ -539,7 +539,7 @@ where /// The method does no guarding against overflows, so the removal of more than `usize::MAX` elements either produces the wrong result or panics. If debug assertions are enabled, a panic is guaranteed. /// # Panics /// - /// This function might panic if then number of elements removed is greater than `usize::MAX`. + /// This function might panic if the number of elements removed is greater than `usize::MAX`. #[inline] pub fn remove_proper_supersets<Q>(&mut self, value: &Q) -> usize where @@ -555,7 +555,7 @@ where /// The method does no guarding against overflows, so the removal of more than `usize::MAX` elements either produces the wrong result or panics. If debug assertions are enabled, a panic is guaranteed. /// # Panics /// - /// This function might panic if then number of elements removed is greater than `usize::MAX`. + /// This function might panic if the number of elements removed is greater than `usize::MAX`. #[inline] pub fn remove_subsets<Q>(&mut self, value: &Q) -> usize where @@ -571,7 +571,7 @@ where /// The method does no guarding against overflows, so the removal of more than `usize::MAX` elements either produces the wrong result or panics. If debug assertions are enabled, a panic is guaranteed. /// # Panics /// - /// This function might panic if then number of elements removed is greater than `usize::MAX`. + /// This function might panic if the number of elements removed is greater than `usize::MAX`. #[inline] pub fn remove_supersets<Q>(&mut self, value: &Q) -> usize where