From 3bb3213576933dc1f43f5ed6f933cc7a8030014b Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Wed, 22 Dec 2021 17:29:52 +0100 Subject: bin: lib: address some clippy lints Mostly about match autoref / autoderef kicking in. --- src/lib.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/lib.rs') diff --git a/src/lib.rs b/src/lib.rs index aee486d..5cf62c1 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,3 +1,5 @@ +#![allow(clippy::new_without_default)] + use std::{convert::TryFrom, fmt, io::{self, BufWriter, Error, Write}, @@ -72,7 +74,7 @@ pub mod ioctl ioctl( fd.as_raw_fd(), PIO_CMAP, - std::mem::transmute::<&Palette, *const libc::c_void>(&pal), + std::mem::transmute::<&Palette, *const libc::c_void>(pal), ) } }) @@ -1018,7 +1020,7 @@ impl Palette } let mut res = Self::new(); - res.0.copy_from_slice(&b); + res.0.copy_from_slice(b); Ok(res) } @@ -1164,7 +1166,7 @@ impl Console Err(io::Error::new( io::ErrorKind::Other, - format!("could not retrieve fd for any of the search paths"), + String::from("could not retrieve fd for any of the search paths"), )) } -- cgit v1.2.3