mirror of
https://github.com/librespot-org/librespot.git
synced 2025-10-04 10:19:27 +02:00
Update to Rust 2018
- Fix deprecated Error::cause warnings and missing dyn - Reset max_width - Add rustfmt to Travis - Run rustfmt on full codebase with `cargo fmt --all` - Add rustfmt to Travis - Complete migration to edition 2018 - Replace try! shorthand - Use explicit `dyn Trait`
This commit is contained in:
parent
be2ad9059a
commit
d26590afc5
45 changed files with 331 additions and 238 deletions
|
@ -57,7 +57,9 @@ impl<T: AsyncRead + AsyncWrite> Future for ProxyTunnel<T> {
|
|||
let mut response = httparse::Response::new(&mut headers);
|
||||
let status = match response.parse(&buf) {
|
||||
Ok(status) => status,
|
||||
Err(err) => return Err(io::Error::new(io::ErrorKind::Other, err.description())),
|
||||
Err(err) => {
|
||||
return Err(io::Error::new(io::ErrorKind::Other, err.description()))
|
||||
}
|
||||
};
|
||||
|
||||
if status.is_complete() {
|
||||
|
@ -102,7 +104,8 @@ fn proxy_connect<T: AsyncWrite>(connection: T, connect_url: &str) -> WriteAll<T,
|
|||
\r\n",
|
||||
uri.host().expect(&format!("No host in {}", uri)),
|
||||
uri.port().expect(&format!("No port in {}", uri))
|
||||
).into_bytes();
|
||||
)
|
||||
.into_bytes();
|
||||
|
||||
write_all(connection, buffer)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue