diff options
| author | mo8it <mo8it@proton.me> | 2025-02-21 13:08:34 +0100 |
|---|---|---|
| committer | mo8it <mo8it@proton.me> | 2025-02-21 13:08:34 +0100 |
| commit | 374c3874afcd01ed0c88047589967d568ceac49f (patch) | |
| tree | 8e3fa663ad34d7540178393d4de3d1e5f39746a1 /solutions/16_lifetimes/lifetimes1.rs | |
| parent | 1eb6c1e469de2492d823d4739114d8a85cd6660b (diff) | |
Apply 2024 edition formatting to solutions
Diffstat (limited to 'solutions/16_lifetimes/lifetimes1.rs')
| -rw-r--r-- | solutions/16_lifetimes/lifetimes1.rs | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/solutions/16_lifetimes/lifetimes1.rs b/solutions/16_lifetimes/lifetimes1.rs index ca7b688..4f56834 100644 --- a/solutions/16_lifetimes/lifetimes1.rs +++ b/solutions/16_lifetimes/lifetimes1.rs @@ -5,11 +5,7 @@ fn longest<'a>(x: &'a str, y: &'a str) -> &'a str { // ^^^^ ^^ ^^ ^^ - if x.len() > y.len() { - x - } else { - y - } + if x.len() > y.len() { x } else { y } } fn main() { |
