changeset 527:deb79bf7f240

fix warnings
author João Oliveira <hello@jxs.pt>
date Mon, 18 May 2020 23:50:41 +0100
parents 79e0bbc4f604
children 0c3b736b2781
files src/error.rs src/log.rs
diffstat 2 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/error.rs	Mon May 18 23:43:14 2020 +0100
+++ b/src/error.rs	Mon May 18 23:50:41 2020 +0100
@@ -47,7 +47,7 @@
 
 impl Display for Status {
     fn fmt(&self, fmt: &mut Formatter) -> result::Result<(), fmt::Error> {
-        fmt.write_str(self.description())
+        fmt.write_str(&self.to_string())
     }
 }
 
@@ -90,7 +90,7 @@
             _ => StatusCode::IOError,
         };
 
-        Status::new(c, e.description())
+        Status::new(c, &e.to_string())
     }
 }
 
@@ -104,7 +104,7 @@
     fn from(e: snap::Error) -> Status {
         Status {
             code: StatusCode::CompressionError,
-            err: e.description().to_string(),
+            err: e.to_string(),
         }
     }
 }
--- a/src/log.rs	Mon May 18 23:43:14 2020 +0100
+++ b/src/log.rs	Mon May 18 23:50:41 2020 +0100
@@ -210,7 +210,7 @@
 
 pub fn unmask_crc(mc: u32) -> u32 {
     let rot = mc.wrapping_sub(MASK_DELTA);
-    (rot.wrapping_shr(17) | rot.wrapping_shl(15))
+    rot.wrapping_shr(17) | rot.wrapping_shl(15)
 }
 
 #[cfg(test)]