Fix latest Clippy for good (#1418)

* More Clippy

* More clippy

* More ignore
This commit is contained in:
Dominik Maier 2023-08-13 12:10:55 +02:00 committed by GitHub
parent b02592c5c7
commit dcdfa978a4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 2 deletions

View File

@ -11,6 +11,7 @@ pub mod launcher;
#[allow(clippy::ignored_unit_patterns)] #[allow(clippy::ignored_unit_patterns)]
pub mod llmp; pub mod llmp;
#[cfg(feature = "tcp_manager")] #[cfg(feature = "tcp_manager")]
#[allow(clippy::ignored_unit_patterns)]
pub mod tcp; pub mod tcp;
use alloc::{boxed::Box, string::String, vec::Vec}; use alloc::{boxed::Box, string::String, vec::Vec};
#[cfg(all(unix, feature = "std"))] #[cfg(all(unix, feature = "std"))]

View File

@ -1050,7 +1050,7 @@ impl Emulator {
perms: MmapPerms, perms: MmapPerms,
) -> Result<GuestAddr, String> { ) -> Result<GuestAddr, String> {
self.mmap(addr, size, perms, libc::MAP_PRIVATE | libc::MAP_ANONYMOUS) self.mmap(addr, size, perms, libc::MAP_PRIVATE | libc::MAP_ANONYMOUS)
.map_err(|_| format!("Failed to map {addr}")) .map_err(|()| format!("Failed to map {addr}"))
.map(|addr| addr as GuestAddr) .map(|addr| addr as GuestAddr)
} }
@ -1067,7 +1067,7 @@ impl Emulator {
perms, perms,
libc::MAP_FIXED | libc::MAP_PRIVATE | libc::MAP_ANONYMOUS, libc::MAP_FIXED | libc::MAP_PRIVATE | libc::MAP_ANONYMOUS,
) )
.map_err(|_| format!("Failed to map {addr}")) .map_err(|()| format!("Failed to map {addr}"))
.map(|addr| addr as GuestAddr) .map(|addr| addr as GuestAddr)
} }

View File

@ -58,15 +58,18 @@
) )
)] )]
#[allow(clippy::ignored_unit_patterns)]
pub mod inmemory; pub mod inmemory;
pub use inmemory::InMemoryBytesCoverageSugar; pub use inmemory::InMemoryBytesCoverageSugar;
#[cfg(target_os = "linux")] #[cfg(target_os = "linux")]
#[allow(clippy::ignored_unit_patterns)]
pub mod qemu; pub mod qemu;
#[cfg(target_os = "linux")] #[cfg(target_os = "linux")]
pub use qemu::QemuBytesCoverageSugar; pub use qemu::QemuBytesCoverageSugar;
#[cfg(target_family = "unix")] #[cfg(target_family = "unix")]
#[allow(clippy::ignored_unit_patterns)]
pub mod forkserver; pub mod forkserver;
#[cfg(target_family = "unix")] #[cfg(target_family = "unix")]
pub use forkserver::ForkserverBytesCoverageSugar; pub use forkserver::ForkserverBytesCoverageSugar;