1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-08-30 00:29:29 +02:00

use read only self for Middleware

This commit is contained in:
Nikolay Kim
2018-06-21 23:06:23 +06:00
parent 3de9284592
commit 65ca563579
18 changed files with 150 additions and 173 deletions

View File

@@ -412,7 +412,7 @@ mod tests {
fn test_with_json() {
let mut cfg = JsonConfig::default();
cfg.limit(4096);
let mut handler = With::new(|data: Json<MyObject>| data, cfg);
let handler = With::new(|data: Json<MyObject>| data, cfg);
let req = HttpRequest::default();
assert!(handler.handle(req).as_err().is_some());