MCPcopy Create free account
hub / github.com/QMHTMY/RustBook / cmp

Method cmp

code/chapter08/dijkstra.rs:25–27  ·  view source on GitHub ↗
(&self, other: &Self)

Source from the content-addressed store, hash-verified

23// 为 Visited 添加全序比较功能
24impl<V> Ord for Visited<V> {
25 fn cmp(&self, other: &Self) -> Ordering {
26 other.distance.cmp(&self.distance)
27 }
28}
29
30impl<V> PartialOrd for Visited<V> {

Callers 6

bucket_sortFunction · 0.45
searchMethod · 0.45
getMethod · 0.45
insertMethod · 0.45
searchMethod · 0.45
partial_cmpMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected