Compare commits

...

2 Commits

Author SHA1 Message Date
7a1ca00837 solution to exercise 04_05 2024-07-13 17:39:46 +02:00
1789d43730 solution to exercise 04_04 2024-07-13 17:30:01 +02:00
2 changed files with 5 additions and 2 deletions

View File

@@ -8,7 +8,7 @@
// 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!
#[derive(PartialEq)]
#[derive(Debug, PartialEq)]
struct Ticket {
title: String,
description: String,

View File

@@ -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 {