MCPcopy Create free account
hub / github.com/EbTech/rust-algorithms / asserting_cmp

Function asserting_cmp

src/order.rs:13–15  ·  view source on GitHub ↗

Ordering algorithms. A comparator on partially ordered elements, that panics if they are incomparable # Example ``` use contest_algorithms::order::asserting_cmp; let mut vec = vec![4.5, -1.7, 1.2]; vec.sort_unstable_by(asserting_cmp); assert_eq!(vec, vec![-1.7, 1.2, 4.5]); ```

(a: &T, b: &T)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 2

slice_lower_boundFunction · 0.85
slice_upper_boundFunction · 0.85

Calls 1

partial_cmpMethod · 0.80

Tested by

no test coverage detected