Skip to content

Commit cf6e9a8

Browse files
committed
Auto merge of #2187 - JohnTitor:tweak-test, r=jtgeibel
Remove use of private items `serde_json` tweaks the visibility of `ErrorCode` and `syntax()` so they are not available with further version(1.0.45). I don't update deps at this point but this tweak should be useful for further work.
2 parents eaf78af + 4efd08f commit cf6e9a8

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

src/router.rs

Lines changed: 5 additions & 7 deletions
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)