Fix test name and simplify helper
This commit is contained in:
1 parent
8ba24baaf7
commit
3611f46004
2 files changed
+2
-5
No files matched your search
+1
-4
@@ -175,10 +175,7 @@ pub mod testhelpers {
|
||||
impl BodyReader for ResponseBody<Body> {
|
||||
fn read_to_str(&self) -> &str {
|
||||
match self {
|
||||
ResponseBody::Body(body) => match body {
|
||||
Body::Bytes(b) => std::str::from_utf8(&b).unwrap(),
|
||||
_ => panic!("Unknown response body content"),
|
||||
},
|
||||
ResponseBody::Body(Body::Bytes(ref b)) => std::str::from_utf8(b).unwrap(),
|
||||
_ => panic!("Unknown response body"),
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user