diff --git a/Cargo.toml b/Cargo.toml index 7dd6a33..a4b06ee 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "discrete_range_map" -version = "0.6.0" +version = "0.6.1" authors = ["James Forster "] edition = "2021" description = """ diff --git a/src/discrete_range_map.rs b/src/discrete_range_map.rs index 4d039cd..852dd37 100644 --- a/src/discrete_range_map.rs +++ b/src/discrete_range_map.rs @@ -1486,7 +1486,7 @@ pub trait InclusiveRange { self.start() <= self.end() } - ///requires that self comes before other and they don't overlap + /// requires that self comes before other and they don't overlap fn touches_ordered(&self, other: &Self) -> bool where I: PointType, @@ -1494,7 +1494,7 @@ pub trait InclusiveRange { self.end() == other.start().down().unwrap() } - ///requires that self comes before other + /// requires that self comes before other fn overlaps_ordered(&self, other: &Self) -> bool where I: PointType, @@ -1502,7 +1502,7 @@ pub trait InclusiveRange { self.contains(other.start()) || self.contains(other.end()) } - // Intersect the range with the other one, and return Some if the intersection is not empty. + /// Intersect the range with the other one, and return Some if the intersection is not empty. fn intersect(&self, other: &Self) -> Option where I: PointType, @@ -1520,6 +1520,7 @@ pub trait InclusiveRange { } } + /// Move the entire range by the given amount. fn translate(&self, delta: I) -> Self where I: PointType, @@ -1532,6 +1533,7 @@ pub trait InclusiveRange { }) } + /// The amount between the start and the end points of the range. fn size(&self) -> I where I: PointType, @@ -1540,7 +1542,7 @@ pub trait InclusiveRange { (self.end() - self.start()).up().unwrap() } - ///requires that self comes before other + /// requires that self comes before other fn merge_ordered(&self, other: &Self) -> Self where Self: From>,