Compare commits
2 Commits
no-lifetim
...
c3f1b7b230
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c3f1b7b230 | ||
|
|
ae27ad2db2 |
@@ -6,7 +6,7 @@ fn main() {
|
||||
println!("The longest string is {result}");
|
||||
}
|
||||
|
||||
fn longest(a: &str, b: &str) -> &str {
|
||||
fn longest<'a>(a: &'a str, b: &'a str) -> &'a str {
|
||||
if a.len() > b.len() {
|
||||
a
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user