Advertisement
Guest User

Untitled

a guest
Jul 17th, 2019
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. error[E0597]: `pool` does not live long enough
  2. --> src/main.rs:22:63
  3. |
  4. 22 | let service = || service_fn(|req| router(req, pool.clone()));
  5. | -- -----------------------------^^^^----------
  6. | | | |
  7. | | | borrowed value does not live long enough
  8. | | returning this value requires that `pool` is borrowed for `'static`
  9. | value captured here
  10. ...
  11. 30 | })
  12. | - `pool` dropped here while still borrowed
  13.  
  14. error: aborting due to previous error
  15.  
  16. For more information about this error, try `rustc --explain E0597`.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement