Function ::std::cmp::min

Overview
fn min(v1, v2)

Compares and returns the minimum of two values.

Returns the first argument if the comparison determines them to be equal.

Internally uses the [CMP] protocol.

Examples

use std::cmp::min;

assert_eq!(min(1, 2), 1);
assert_eq!(min(2, 2), 2);