mirror of
https://github.com/fafhrd91/actix-web
synced 2025-07-01 00:44:26 +02:00
Make web::Data deref to Arc<T> #1214
This commit is contained in:
@ -1106,7 +1106,7 @@ mod tests {
|
||||
web::scope("app").data(10usize).route(
|
||||
"/t",
|
||||
web::get().to(|data: web::Data<usize>| {
|
||||
assert_eq!(*data, 10);
|
||||
assert_eq!(**data, 10);
|
||||
let _ = data.clone();
|
||||
HttpResponse::Ok()
|
||||
}),
|
||||
@ -1125,7 +1125,7 @@ mod tests {
|
||||
web::scope("app").app_data(web::Data::new(10usize)).route(
|
||||
"/t",
|
||||
web::get().to(|data: web::Data<usize>| {
|
||||
assert_eq!(*data, 10);
|
||||
assert_eq!(**data, 10);
|
||||
let _ = data.clone();
|
||||
HttpResponse::Ok()
|
||||
}),
|
||||
|
Reference in New Issue
Block a user