solution to exercise 04_05
This commit is contained in:
parent
1789d43730
commit
7a1ca00837
@ -6,7 +6,10 @@
|
||||
// collections (e.g. BTreeMap).
|
||||
|
||||
/// Return the minimum of two values.
|
||||
pub fn min<T>(left: T, right: T) -> T {
|
||||
pub fn min<T>(left: T, right: T) -> T
|
||||
where
|
||||
T: Ord,
|
||||
{
|
||||
if left <= right {
|
||||
left
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user