Skip to content

Commit be63c51

Browse files
committed
chore(doc): add clarifying comments in vercmp
1 parent f740c35 commit be63c51

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

crates/sprout/src/utils/vercmp.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ pub fn compare_versions_optional(a: Option<&str>, b: Option<&str>) -> Ordering {
2323
match (a, b) {
2424
// If both have values, compare them.
2525
(Some(a), Some(b)) => compare_versions(a, b),
26-
// If the second value is None, return that it is less than the first.
26+
// If the second value is None, then `a` is less than `b`.
2727
(Some(_a), None) => Ordering::Less,
28-
// If the first value is None, return that it is greater than the second.
28+
// If the first value is None, the `a` is greater than `b`.
2929
(None, Some(_b)) => Ordering::Greater,
3030
// If both values are None, return that they are equal.
3131
(None, None) => Ordering::Equal,

0 commit comments

Comments
 (0)