Function ::std::cmp::max

fn max(v1, v2)

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