2019-05-28 14:46:13 -04:00
|
|
|
fn get_closure() -> Box<dyn Fn() -> Vec<u8>> {
|
2017-06-05 11:35:17 +01:00
|
|
|
let vec = vec![1u8, 2u8];
|
|
|
|
|
2017-11-20 13:13:27 +01:00
|
|
|
let closure = move || { //~ ERROR expected a closure
|
2017-06-05 11:35:17 +01:00
|
|
|
vec
|
|
|
|
};
|
|
|
|
|
|
|
|
Box::new(closure)
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|