Type de fermeture en rouille
fn main() {
type ClosureType = fn(x: i32) -> i32;
fn foo(closure: ClosureType) {
println!("{}", closure(10))
}
foo(|x| {
x
});
}
Ahmad Khaefi