From c260e833e4cad8b187b2f720ca16fffe199025c7 Mon Sep 17 00:00:00 2001 From: Zanie Date: Fri, 8 Dec 2023 12:01:33 -0600 Subject: [PATCH] Tweak docs --- src/range.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/range.rs b/src/range.rs index 5b7d2c2d..fc04e8b0 100644 --- a/src/range.rs +++ b/src/range.rs @@ -419,16 +419,16 @@ impl Range { Self { segments: output }.check_invariants() } - /// Returns a simpler Range that contains the same versions + /// Returns a simpler Range that contains the same versions. /// - /// For every one of the Versions provided in versions the existing range and - /// the simplified range will agree on whether it is contained. + /// For every one of the Versions provided in versions the existing range and the simplified range will agree on whether it is contained. /// The simplified version may include or exclude versions that are not in versions as the implementation wishes. - /// For example: - /// - If all the versions are contained in the original than the range will be simplified to `full`. - /// - If none of the versions are contained in the original than the range will be simplified to `empty`. /// - /// If versions are not sorted the correctness of this function is not guaranteed. + /// If none of the versions are contained in the original than the range will be returned unmodified. + /// If the range includes a single version, it will be returned unmodified. + /// If all the versions are contained in the original than the range will be simplified to `full`. + /// + /// If the given versions are not sorted the correctness of this function is not guaranteed. pub fn simplify<'v, I>(&self, versions: I) -> Self where I: Iterator + 'v,