From 1a9d10d298a998e97b1714d40bdad09e9ca3b925 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bennet=20Ble=C3=9Fmann?= Date: Tue, 28 May 2024 19:59:32 +0200 Subject: [PATCH] fix two clippy lints --- src/machine/streams.rs | 13 ++++++------- src/parser/parser.rs | 2 +- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/src/machine/streams.rs b/src/machine/streams.rs index c2adb47e..be5591cf 100644 --- a/src/machine/streams.rs +++ b/src/machine/streams.rs @@ -24,7 +24,6 @@ use std::io; #[cfg(feature = "http")] use std::io::BufRead; use std::io::{Cursor, ErrorKind, Read, Seek, SeekFrom, Write}; -use std::mem; use std::net::{Shutdown, TcpStream}; use std::ops::{Deref, DerefMut}; use std::path::PathBuf; @@ -296,9 +295,9 @@ impl Read for HttpReadStream { #[cfg(feature = "http")] pub struct HttpWriteStream { status_code: u16, - headers: mem::ManuallyDrop, + headers: std::mem::ManuallyDrop, response: TypedArenaPtr, - buffer: mem::ManuallyDrop>, + buffer: std::mem::ManuallyDrop>, } #[cfg(feature = "http")] @@ -325,8 +324,8 @@ impl Write for HttpWriteStream { #[cfg(feature = "http")] impl HttpWriteStream { fn drop(&mut self) { - let headers = unsafe { mem::ManuallyDrop::take(&mut self.headers) }; - let buffer = unsafe { mem::ManuallyDrop::take(&mut self.buffer) }; + let headers = unsafe { std::mem::ManuallyDrop::take(&mut self.headers) }; + let buffer = unsafe { std::mem::ManuallyDrop::take(&mut self.buffer) }; let (ready, response, cvar) = &**self.response; @@ -1228,8 +1227,8 @@ impl Stream { StreamLayout::new(CharReader::new(HttpWriteStream { response, status_code, - headers: mem::ManuallyDrop::new(headers), - buffer: mem::ManuallyDrop::new(Vec::new()), + headers: std::mem::ManuallyDrop::new(headers), + buffer: std::mem::ManuallyDrop::new(Vec::new()), })), arena )) diff --git a/src/parser/parser.rs b/src/parser/parser.rs index 47e82921..c4d509b4 100644 --- a/src/parser/parser.rs +++ b/src/parser/parser.rs @@ -109,7 +109,7 @@ pub(crate) fn as_partial_string( tail_ref = succ; } Term::PartialString(_, pstr, tail) => { - string += &pstr; + string += pstr; tail_ref = tail; } Term::CompleteString(_, cstr) => { -- 2.54.0