1
0
mirror of https://github.com/actix/examples synced 2025-06-29 10:14:58 +02:00

Updated other/data-factory to v4. (#518)

This commit is contained in:
Christopher Gubbin
2022-02-02 15:13:08 +00:00
committed by GitHub
parent 5cf5295ea9
commit 4174a4c62f
3 changed files with 11 additions and 11 deletions

View File

@ -15,13 +15,13 @@ async fn main() -> std::io::Result<()> {
.await
.expect("fail to build pool");
let pool = RedisWrapper(pool);
let pool = Data::new(RedisWrapper(pool));
HttpServer::new(move || {
let redis_url = redis_url.clone();
App::new()
.data(pool.clone())
.app_data(pool.clone())
// a dummy data_factory implementation
.data_factory(|| {
/*