diff --git a/README.md b/README.md index f2bce9c..50b58d1 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ - use it in robot_Sweet_graph for a bit before publishing -- update caveates to address dummy-removal updates +- update lines of code figures on docs - run cargo fmt - run and fix cargo clippy diff --git a/src/lib.rs b/src/lib.rs index 1c5aff7..8b553a0 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -20,7 +20,7 @@ along with range_bounds_map. If not, see . //! This crate provides [`RangeBoundsMap`] and [`RangeBoundsSet`]. //! //! [`RangeBoundsMap`] is similar to [`BTreeMap`] except [`RangeBoundsMap`] -//! uses any type that implements [`RangeBounds`] as keys, while +//! uses any type that implements the [`RangeBounds`] trait as keys, while //! maintaining two invariants: //! - No two keys may overlap //! - A keys' [`start_bound()`] <= its [`end_bound()`] @@ -28,10 +28,6 @@ along with range_bounds_map. If not, see . //! [`RangeBoundsSet`] is like [`RangeBoundsMap`] except it //! uses `()` as values, as [`BTreeSet`] does for [`BTreeMap`] //! -//! If you use an custom type as a key, it must implement two main traits: -//! - The std library's [`RangeBounds`] -//! - This crate's [`RangeBoundsExt`] -//! //! # Example using [`Range`]s //! //! ``` @@ -74,15 +70,6 @@ along with range_bounds_map. If not, see . //! } //! } //! } -//! -//! // Second we need to implement RangeBoundsExt -//! impl RangeBoundsExt for Reservation { -//! fn dummy(start_bound: Bound, end_bound: Bound) -> Self { -//! match end_bound { -//! Bound:: -//! } -//! } -//! } //! ``` //! //! @@ -111,12 +98,6 @@ along with range_bounds_map. If not, see . //! - `is_subset()` //! - etc... a bunch more //! - Sub-optimal use of unnecessary `cloned()` just to placate the borrow checker -//! - Requirement for `dummy()` trait function needed to implement some of -//! the internal functions that wouldn't be neccessary if `BTreeMap` had -//! either a Cursor API or a Comparator API (google for the respective -//! rust-lang issues) However the `dummy()` trait function would be -//! unavoidable for the `gaps()` function if you wanted an iterator over -//! your same key type //! - The library needs some benchmarks //! - Insert should panic on "bad" Zero RangeBounds like when start_bound > //! end_bound or Excluded(x)-Excluded(x) Excluded(x)-Included(x) Included(x)-Excluded(x) @@ -125,9 +106,6 @@ along with range_bounds_map. If not, see . //! - FromIterator //! - IntoIterator //! - Probably a bunch more -//! - Allow non-insert functions such as [`RangeBoundsMap::overlapping()`] -//! to take a possibly different [`RangeBounds`] type. Such as querying a -//! [`Range`]-based [`RangeBoundsMap`] using a [`RangeInclusive`] //! //! # Credit //!