Compare commits
2 Commits
604a5a20ae
...
7a1ca00837
| Author | SHA1 | Date | |
|---|---|---|---|
| 7a1ca00837 | |||
| 1789d43730 |
@@ -8,7 +8,7 @@
|
|||||||
// print both sides of the comparison to the terminal.
|
// print both sides of the comparison to the terminal.
|
||||||
// If the compared type doesn't implement `Debug`, it doesn't know how to represent them!
|
// If the compared type doesn't implement `Debug`, it doesn't know how to represent them!
|
||||||
|
|
||||||
#[derive(PartialEq)]
|
#[derive(Debug, PartialEq)]
|
||||||
struct Ticket {
|
struct Ticket {
|
||||||
title: String,
|
title: String,
|
||||||
description: String,
|
description: String,
|
||||||
|
|||||||
@@ -6,7 +6,10 @@
|
|||||||
// collections (e.g. BTreeMap).
|
// collections (e.g. BTreeMap).
|
||||||
|
|
||||||
/// Return the minimum of two values.
|
/// 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 {
|
if left <= right {
|
||||||
left
|
left
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user