3 ms·
You are correct in assuming that the assignment would be a type error. Similar to other languages, you'd have to allocate. In rust, it would probably look lik
by tyoverby 10y ago
You are correct in assuming that the assignment would be a type error.
Similar to other languages, you'd have to allocate. In rust, it would probably look like:
let mut fut: Box<Future<()>> = Box::new(Future<()>::new());
and then
fut = Box::new(fut.and_then(|| file.close()));