mirror of
https://github.com/rust-lang/rustlings.git
synced 2026-01-11 05:09:19 +00:00
reached lifetimes
This commit is contained in:
parent
b3bf533eb1
commit
75cb101584
@ -9,7 +9,7 @@
|
||||
|
||||
// I AM NOT DONE
|
||||
|
||||
fn longest(x: &str, y: &str) -> &str {
|
||||
fn longest<'a>(x: &'a str, y: &'a str) -> &'a str {
|
||||
if x.len() > y.len() {
|
||||
x
|
||||
} else {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user