1
0
mirror of https://github.com/actix/actix-website synced 2024-11-27 18:12:57 +01:00

Fix param name in db example (#191)

This commit is contained in:
Pirmin Kalberer 2020-09-25 00:53:32 +02:00 committed by GitHub
parent e7ca7fddd7
commit c5e185ae85
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -46,7 +46,7 @@ async fn main() -> io::Result<()> {
// </main>
// <index>
async fn index(req: web::Data<DbPool>, name: web::Path<(String)>) -> impl Responder {
async fn index(pool: web::Data<DbPool>, name: web::Path<(String)>) -> impl Responder {
let name = name.into_inner();
let conn = pool.get().expect("couldn't get db connection from pool");