What's the normal way of dealing with "global" state in a Rust program using tokio?
Or, to ask a more specific question expressing what I think I want: is there a way to teach the borrow checker that an object has a lifetime longer than the tokio event loop?
/cc @ManishEarth
2
1
I don't think I want a proper global since the "global" is set up differently in the running bot versus the tests. And it's state that's used in a bunch of functions. (That said, what I'm thinking of might fail on mutable vs. non-mutable borrows anyway... need to look.)
Mar 27, 2018 · 6:40 PM UTC
1


