I'm learning how to use Rocket, but I don't believe my question is specific to Rocket.
I want to define several routes that share access to a
You can see my code here: rust-rocket-demo/main.rs at master · mvolkmann/rust-rocket-demo · GitHub
When I enter
cargo clippy I get lots of errors that say "can't capture dynamic environment in a fn item".
I understand why it says this. Functions are not closures, so my functions cannot see
But what is the best way to handle this? I could try changing all my functions that want to access
dog_map to be closures, but then maybe the Rocket attributes like
post won't work.