Function std::cmp::min

Overview
fn min(v1: any, v2: any) -> any

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);