diff --git a/src/range_bounds_map.rs b/src/range_bounds_map.rs index dbb878c..46f0f06 100644 --- a/src/range_bounds_map.rs +++ b/src/range_bounds_map.rs @@ -149,7 +149,7 @@ pub struct OverlapError; /// ``` /// use range_bounds_map::{RangeBoundsMap, TryFromBoundsError}; /// -/// let range_bounds_map = +/// let mut range_bounds_map = /// RangeBoundsMap::try_from([(2..8, true)]).unwrap(); /// /// assert_eq!( @@ -385,7 +385,7 @@ where /// /// assert_eq!( /// overlapping.collect::<Vec<_>>(), - /// [(&(1..4), &false), (&(4..8), &true), (&(8..100), &false)] + /// [(&(1..4), &false), (&(4..8), &true)] /// ); /// ``` pub fn overlapping<Q>( @@ -602,7 +602,7 @@ where /// /// assert_eq!( /// range_bounds_map.iter().collect::<Vec<_>>(), - /// [(&(1..4), false), (&(4..8), true)] + /// [(&(8..100), &false)] /// ); /// ``` pub fn remove_overlapping<Q>( diff --git a/todo.txt b/todo.txt index 9633099..e94ab58 100644 --- a/todo.txt +++ b/todo.txt @@ -1,25 +1,15 @@ -- check documentation to remove mentions of insert without the naming - modifier - -- remove test is_valid_range_bounds and use the same one the module - uses +- remove test is_valid_range_bounds and use the same one the module uses - write more tests for more complicated functions +- test for atomnicity, if it fails it shouldn't affect the map -- write docs for everything again +- write docs for undocced things - add issues to github for all the caveats - review caveats again -- remove all unwraps from examples - -- refactor tests with a bunch of next()s into using collect for - assert_eq - - copy map to set again -- test for atomnicity, if it fails it shouldn't affect the map - - write something somewhere about wrapper types for RangeBoundsMap that can simplify function signatures due to known invariants. For example a wrapper for using K=std::ops::Range which simplifies a LOT