summaryrefslogtreecommitdiff
path: root/solutions/16_lifetimes/lifetimes2.rs
diff options
context:
space:
mode:
Diffstat (limited to 'solutions/16_lifetimes/lifetimes2.rs')
-rw-r--r--solutions/16_lifetimes/lifetimes2.rs6
1 files changed, 1 insertions, 5 deletions
diff --git a/solutions/16_lifetimes/lifetimes2.rs b/solutions/16_lifetimes/lifetimes2.rs
index b0f2ef1..3ca4909 100644
--- a/solutions/16_lifetimes/lifetimes2.rs
+++ b/solutions/16_lifetimes/lifetimes2.rs
@@ -1,9 +1,5 @@
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() {