Skip to content

Commit cffa355

Browse files
committed
Fix serde_json error
1 parent 9e14765 commit cffa355

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

src/router.rs

+5-7
Original file line numberDiff line numberDiff line change
@@ -221,13 +221,11 @@ mod tests {
221221

222222
// All other error types are propogated up the middleware, eventually becoming status 500
223223
assert!(C(|_| Err(internal(""))).call(&mut req).is_err());
224-
assert!(C(|_| err(::serde_json::Error::syntax(
225-
::serde_json::error::ErrorCode::ExpectedColon,
226-
0,
227-
0
228-
)))
229-
.call(&mut req)
230-
.is_err());
224+
assert!(
225+
C(|_| err::<::serde_json::Error>(::serde::de::Error::custom("ExpectedColon")))
226+
.call(&mut req)
227+
.is_err()
228+
);
231229
assert!(
232230
C(|_| err(::std::io::Error::new(::std::io::ErrorKind::Other, "")))
233231
.call(&mut req)

0 commit comments

Comments
 (0)