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