chiark / gitweb /
clippy
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Mon, 3 Aug 2020 10:32:24 +0000 (11:32 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Mon, 3 Aug 2020 10:32:24 +0000 (11:32 +0100)
The message is wrong
   filed https://github.com/rust-lang/rust-clippy/issues/5862

but this seems weird style so change it

src/sse.rs

index ce57ecac9a4c5c37604f1a92894521600602541e..15c2b4ec8ef5f414ce14a1a64f1866814306858e 100644 (file)
@@ -38,8 +38,7 @@ impl Read for UpdateReader {
 
     let mut ig = self.gref.lock().map_err(|_| em("poison"))?;
     let orig_wanted = orig_buf.len();
-    #[allow(clippy::useless_asref)] // todo: report this
-    let mut buf = orig_buf.as_mut();
+    let mut buf = &mut *orig_buf;
 
     if self.init_confirmation_send.next().is_some() {
       write!(buf, "event: commsworking\n\