Browse Source

Fix depreciation warnings

Fixes error description depreciation warnings and removes unnecessary parentheses
Sasha Hilton 3 years ago
parent
commit
4a21b5cbeb
3 changed files with 3 additions and 8 deletions
  1. 0 4
      audio/src/lewton_decoder.rs
  2. 2 2
      connect/src/spirc.rs
  3. 1 2
      core/src/proxytunnel.rs

+ 0 - 4
audio/src/lewton_decoder.rs

@@ -71,10 +71,6 @@ impl fmt::Display for VorbisError {
 }
 
 impl error::Error for VorbisError {
-    fn description(&self) -> &str {
-        error::Error::description(&self.0)
-    }
-
     fn source(&self) -> Option<&(dyn error::Error + 'static)> {
         error::Error::source(&self.0)
     }

+ 2 - 2
connect/src/spirc.rs

@@ -454,8 +454,8 @@ impl SpircTask {
             Ok(dur) => dur,
             Err(err) => err.duration(),
         };
-        ((dur.as_secs() as i64 + self.session.time_delta()) * 1000
-            + (dur.subsec_nanos() / 1000_000) as i64)
+        (dur.as_secs() as i64 + self.session.time_delta()) * 1000
+            + (dur.subsec_nanos() / 1000_000) as i64
     }
 
     fn ensure_mixer_started(&mut self) {

+ 1 - 2
core/src/proxytunnel.rs

@@ -1,4 +1,3 @@
-use std::error::Error;
 use std::io;
 use std::str::FromStr;
 
@@ -58,7 +57,7 @@ impl<T: AsyncRead + AsyncWrite> Future for ProxyTunnel<T> {
                     let status = match response.parse(&buf) {
                         Ok(status) => status,
                         Err(err) => {
-                            return Err(io::Error::new(io::ErrorKind::Other, err.description()));
+                            return Err(io::Error::new(io::ErrorKind::Other, err.to_string()));
                         }
                     };