Skip to content

Commit e5a2353

Browse files
committed
Update with master
1 parent fd09bec commit e5a2353

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/lib.rs

+7-7
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ mod tests {
145145
impl conduit::Request for RequestSentinel {
146146
fn http_version(&self) -> semver::Version { unimplemented!() }
147147
fn conduit_version(&self) -> semver::Version { unimplemented!() }
148-
fn method(&self) -> Method { self.method }
148+
fn method(&self) -> Method { self.method.clone() }
149149
fn scheme(&self) -> Scheme { unimplemented!() }
150150
fn host<'a>(&'a self) -> Host<'a> { unimplemented!() }
151151
fn virtual_root<'a>(&'a self) -> Option<&'a str> { unimplemented!() }
@@ -170,9 +170,9 @@ mod tests {
170170
let mut res = router.call(&mut req).ok().expect("No response");
171171

172172
assert_eq!(res.status, (200, "OK"));
173-
let mut s = String::new();
174-
res.body.read_to_string(&mut s).unwrap();
175-
assert_eq!(s, "1, Get".to_string());
173+
let mut s = Vec::new();
174+
res.body.write_body(&mut s).unwrap();
175+
assert_eq!(s, b"1, Get");
176176
}
177177

178178
#[test]
@@ -182,9 +182,9 @@ mod tests {
182182
let mut res = router.call(&mut req).ok().expect("No response");
183183

184184
assert_eq!(res.status, (200, "OK"));
185-
let mut s = String::new();
186-
res.body.read_to_string(&mut s).unwrap();
187-
assert_eq!(s, "10, Post".to_string());
185+
let mut s = Vec::new();
186+
res.body.write_body(&mut s).unwrap();
187+
assert_eq!(s, b"10, Post");
188188
}
189189

190190
#[test]

0 commit comments

Comments
 (0)