Fix comment on Ord for SourceId (#15103)

### What does this PR try to resolve?

In PR #14980, the Ord impl for SourceId was changed, but the comment
wasn’t updated. So it is now incorrect.

This PR updates the comment to match the implementation.

### How should we test and review this PR?

Read the Ord for SourceId code and make sure the updated comment
describes what it does.

### Additional information

None
This commit is contained in:
Weihang Lo 2025-01-25 20:35:24 +00:00 committed by GitHub
commit e63457a4ce
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -581,8 +581,8 @@ impl PartialOrd for SourceId {
}
}
// Custom comparison defined as canonical URL equality for git sources and URL
// equality for other sources, ignoring the `precise` and `name` fields.
// Custom comparison defined as source kind and canonical URL equality,
// ignoring the `precise` and `name` fields.
impl Ord for SourceId {
fn cmp(&self, other: &SourceId) -> Ordering {
// If our interior pointers are to the exact same `SourceIdInner` then