1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-08-28 07:47:49 +02:00

Make web::Data deref to Arc<T> #1214

This commit is contained in:
Nikolay Kim
2019-12-20 17:45:35 +06:00
parent 8b8a9a995d
commit e5a50f423d
4 changed files with 18 additions and 14 deletions

View File

@@ -761,9 +761,9 @@ mod tests {
|data1: web::Data<usize>,
data2: web::Data<char>,
data3: web::Data<f64>| {
assert_eq!(*data1, 10);
assert_eq!(*data2, '*');
assert_eq!(*data3, 1.0);
assert_eq!(**data1, 10);
assert_eq!(**data2, '*');
assert_eq!(**data3, 1.0);
HttpResponse::Ok()
},
),