Function std::cmp::max

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

Compares and returns the maximum of two values.

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

Internally uses the [CMP] protocol.

Examples

use std::cmp::max;

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