Skip to main content
Journey Uncommon Logo
JourneyUncommon
mediumRustlifetimes and elisionSingle-choice MCQ

Why does lifetime elision NOT apply to this function, forcing an explicit annotation?

fn pick(a: &str, b: &str) -> &str { if a.len() > b.len() { a } else { b } }