MCPcopy Create free account
hub / github.com/emwalker/digraph / cmp

Method cmp

backend/src/git/types.rs:26–34  ·  view source on GitHub ↗
(&self, other: &Self)

Source from the content-addressed store, hash-verified

24
25impl std::cmp::Ord for Kind {
26 fn cmp(&self, other: &Self) -> std::cmp::Ordering {
27 use std::cmp::Ordering;
28 match (self, &other) {
29 (Self::Topic, Self::Topic) => Ordering::Equal,
30 (Self::Topic, Self::Link) => Ordering::Less,
31 (Self::Link, Self::Topic) => Ordering::Greater,
32 (Self::Link, Self::Link) => Ordering::Equal,
33 }
34 }
35}
36
37impl std::cmp::PartialOrd for Kind {

Callers 1

partial_cmpMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected