From be63c5171ba413920ca27e648ea9a5ac7eb86750 Mon Sep 17 00:00:00 2001 From: Alex Zenla Date: Mon, 3 Nov 2025 02:46:41 -0500 Subject: [PATCH] chore(doc): add clarifying comments in vercmp --- crates/sprout/src/utils/vercmp.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/sprout/src/utils/vercmp.rs b/crates/sprout/src/utils/vercmp.rs index c8ead2b..61eb39a 100644 --- a/crates/sprout/src/utils/vercmp.rs +++ b/crates/sprout/src/utils/vercmp.rs @@ -23,9 +23,9 @@ pub fn compare_versions_optional(a: Option<&str>, b: Option<&str>) -> Ordering { match (a, b) { // If both have values, compare them. (Some(a), Some(b)) => compare_versions(a, b), - // If the second value is None, return that it is less than the first. + // If the second value is None, then `a` is less than `b`. (Some(_a), None) => Ordering::Less, - // If the first value is None, return that it is greater than the second. + // If the first value is None, the `a` is greater than `b`. (None, Some(_b)) => Ordering::Greater, // If both values are None, return that they are equal. (None, None) => Ordering::Equal,