Skip to main content
Journey Uncommon Logo
JourneyUncommon
mediumRustclosures Fn FnMut FnOnceSingle-choice MCQ

A closure that pulls a String out of its environment by moving it (e.g. returning the captured String) implements which trait, and what is the consequence?

fn main() { let s = String::from("x"); let f = move || s; let a = f(); let b = f(); // ? }