Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- error[E0597]: `pool` does not live long enough
- --> src/main.rs:22:63
- |
- 22 | let service = || service_fn(|req| router(req, pool.clone()));
- | -- -----------------------------^^^^----------
- | | | |
- | | | borrowed value does not live long enough
- | | returning this value requires that `pool` is borrowed for `'static`
- | value captured here
- ...
- 30 | })
- | - `pool` dropped here while still borrowed
- error: aborting due to previous error
- For more information about this error, try `rustc --explain E0597`.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement