less restrictive send() signature

This commit is contained in:
Martin Algesten
2018-07-01 19:01:59 +02:00
parent 4fbcc2246f
commit fc1d908d9c

View File

@@ -166,9 +166,7 @@ impl Request {
/// .set("Content-Type", "text/plain")
/// .send(read);
/// ```
pub fn send<R>(&mut self, reader: R) -> Response
where
R: Read + Send + 'static,
pub fn send(&mut self, reader: impl Read + 'static) -> Response
{
self.do_call(Payload::Reader(Box::new(reader)))
}