Cannot borrow captured outer variable in an `Fn` closure as mutable
问题 This is my first day with Rust, but I'm trying to do something trivial, and I'm stuck. What I'm trying to do is to add an struct to a Vector, and return the result. What I'm trying is to create a very simple REST service which will store the data in memory when posting, and return all the data in JSON format when doing a GET. This is my current code: fn main() { let mut server = Nickel::new(); let mut reservations = Vec::new(); server.post("/reservations/", middleware! { |request, response|