diff options
author | Teddy Wing | 2018-11-11 01:51:57 +0100 |
---|---|---|
committer | Teddy Wing | 2018-11-11 01:52:25 +0100 |
commit | a9f405988052a49ad3ebbe2a5b1f0db80036b2cd (patch) | |
tree | 08d0f611e75af20c4dc26913bed9669c7952d071 /license-generator/src/lib.rs | |
parent | b233d678f2109fecc7c6a4b9e2d65590819d96d1 (diff) | |
download | dome-key-web-a9f405988052a49ad3ebbe2a5b1f0db80036b2cd.tar.bz2 |
main(): Give the FastCGI closure access to the DB connection pool
Otherwise we get a borrow error:
error[E0373]: closure may outlive the current function, but it borrows `pool`, which is owned by the current function
--> src/main.rs:67:18
|
67 | fastcgi::run(|mut req| {
| ^^^^^^^^^ may outlive borrowed value `pool`
...
123 | let mut cx = match pool.get_conn() {
| ---- `pool` is borrowed here
help: to force the closure to take ownership of `pool` (and any other referenced variables), use the `move` keyword
|
67 | fastcgi::run(move |mut req| {
| ^^^^^^^^^^^^^^
Diffstat (limited to 'license-generator/src/lib.rs')
0 files changed, 0 insertions, 0 deletions