mirror of
https://github.com/librespot-org/librespot.git
synced 2024-12-18 17:11:53 +00:00
Fix depreciation warnings
Fixes error description depreciation warnings and removes unnecessary parentheses
This commit is contained in:
parent
22ca944c77
commit
4a21b5cbeb
3 changed files with 3 additions and 8 deletions
|
@ -71,10 +71,6 @@ impl fmt::Display for VorbisError {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl error::Error for VorbisError {
|
impl error::Error for VorbisError {
|
||||||
fn description(&self) -> &str {
|
|
||||||
error::Error::description(&self.0)
|
|
||||||
}
|
|
||||||
|
|
||||||
fn source(&self) -> Option<&(dyn error::Error + 'static)> {
|
fn source(&self) -> Option<&(dyn error::Error + 'static)> {
|
||||||
error::Error::source(&self.0)
|
error::Error::source(&self.0)
|
||||||
}
|
}
|
||||||
|
|
|
@ -454,8 +454,8 @@ impl SpircTask {
|
||||||
Ok(dur) => dur,
|
Ok(dur) => dur,
|
||||||
Err(err) => err.duration(),
|
Err(err) => err.duration(),
|
||||||
};
|
};
|
||||||
((dur.as_secs() as i64 + self.session.time_delta()) * 1000
|
(dur.as_secs() as i64 + self.session.time_delta()) * 1000
|
||||||
+ (dur.subsec_nanos() / 1000_000) as i64)
|
+ (dur.subsec_nanos() / 1000_000) as i64
|
||||||
}
|
}
|
||||||
|
|
||||||
fn ensure_mixer_started(&mut self) {
|
fn ensure_mixer_started(&mut self) {
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
use std::error::Error;
|
|
||||||
use std::io;
|
use std::io;
|
||||||
use std::str::FromStr;
|
use std::str::FromStr;
|
||||||
|
|
||||||
|
@ -58,7 +57,7 @@ impl<T: AsyncRead + AsyncWrite> Future for ProxyTunnel<T> {
|
||||||
let status = match response.parse(&buf) {
|
let status = match response.parse(&buf) {
|
||||||
Ok(status) => status,
|
Ok(status) => status,
|
||||||
Err(err) => {
|
Err(err) => {
|
||||||
return Err(io::Error::new(io::ErrorKind::Other, err.description()));
|
return Err(io::Error::new(io::ErrorKind::Other, err.to_string()));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue