From f601729b6c3ec3548d2d73724da855fef3475475 Mon Sep 17 00:00:00 2001 From: FreezyLemon Date: Fri, 5 Jan 2024 17:25:23 +0100 Subject: [PATCH] Remove allow attribute for buggy clippy lints All of these seem to be fixed on toolchains >=1.70 --- ivf/src/lib.rs | 2 -- src/asm/x86/sad_plane.rs | 3 --- src/tiling/plane_region.rs | 3 --- src/tiling/tile_blocks.rs | 3 --- src/tiling/tile_motion_stats.rs | 3 --- src/tiling/tile_restoration_state.rs | 3 --- 6 files changed, 17 deletions(-) diff --git a/ivf/src/lib.rs b/ivf/src/lib.rs index a666e4bc08..116db23f57 100644 --- a/ivf/src/lib.rs +++ b/ivf/src/lib.rs @@ -36,8 +36,6 @@ #![warn(clippy::doc_markdown)] #![warn(clippy::missing_errors_doc)] #![warn(clippy::missing_panics_doc)] -// FIXME: Temporarily disabled due to https://github.com/rust-lang/rust-clippy/issues/9142 -#![allow(clippy::undocumented_unsafe_blocks)] /// Simple ivf muxer /// diff --git a/src/asm/x86/sad_plane.rs b/src/asm/x86/sad_plane.rs index 5f7b900b58..a3ad0584a7 100644 --- a/src/asm/x86/sad_plane.rs +++ b/src/asm/x86/sad_plane.rs @@ -44,9 +44,6 @@ pub(crate) fn sad_plane_internal( macro_rules! call_asm { ($func:ident, $src:expr, $dst:expr, $cpu:expr) => { // SAFETY: Calls Assembly code. - // - // FIXME: Remove `allow` once https://github.com/rust-lang/rust-clippy/issues/8264 fixed - #[allow(clippy::undocumented_unsafe_blocks)] unsafe { let result = $func( mem::transmute(src.data_origin().as_ptr()), diff --git a/src/tiling/plane_region.rs b/src/tiling/plane_region.rs index 67e788bf46..168b1edeb4 100644 --- a/src/tiling/plane_region.rs +++ b/src/tiling/plane_region.rs @@ -411,9 +411,6 @@ macro_rules! plane_region_common { fn index(&self, index: usize) -> &Self::Output { assert!(index < self.rect.height); // SAFETY: The above assert ensures we do not access OOB data. - // - // FIXME: Remove `allow` once https://github.com/rust-lang/rust-clippy/issues/8264 fixed - #[allow(clippy::undocumented_unsafe_blocks)] unsafe { let ptr = self.data.add(index * self.plane_cfg.stride); slice::from_raw_parts(ptr, self.rect.width) diff --git a/src/tiling/tile_blocks.rs b/src/tiling/tile_blocks.rs index cdb95c5821..5bcf42a9be 100644 --- a/src/tiling/tile_blocks.rs +++ b/src/tiling/tile_blocks.rs @@ -151,9 +151,6 @@ macro_rules! tile_blocks_common { fn index(&self, index: usize) -> &Self::Output { assert!(index < self.rows); // SAFETY: The above assert ensures we do not access OOB data. - // - // FIXME: Remove `allow` once https://github.com/rust-lang/rust-clippy/issues/8264 fixed - #[allow(clippy::undocumented_unsafe_blocks)] unsafe { let ptr = self.data.add(index * self.frame_cols); slice::from_raw_parts(ptr, self.cols) diff --git a/src/tiling/tile_motion_stats.rs b/src/tiling/tile_motion_stats.rs index edfcfcdc1c..eb18f9f6ee 100644 --- a/src/tiling/tile_motion_stats.rs +++ b/src/tiling/tile_motion_stats.rs @@ -106,9 +106,6 @@ macro_rules! tile_me_stats_common { fn index(&self, index: usize) -> &Self::Output { assert!(index < self.rows); // SAFETY: The above assert ensures we do not access OOB data. - // - // FIXME: Remove `allow` once https://github.com/rust-lang/rust-clippy/issues/8264 fixed - #[allow(clippy::undocumented_unsafe_blocks)] unsafe { let ptr = self.data.add(index * self.stride); slice::from_raw_parts(ptr, self.cols) diff --git a/src/tiling/tile_restoration_state.rs b/src/tiling/tile_restoration_state.rs index 2b2f2a7237..b56ce496a7 100644 --- a/src/tiling/tile_restoration_state.rs +++ b/src/tiling/tile_restoration_state.rs @@ -108,9 +108,6 @@ macro_rules! tile_restoration_units_common { fn index(&self, index: usize) -> &Self::Output { assert!(index < self.rows); // SAFETY: The above assert ensures we do not access OOB data. - // - // FIXME: Remove `allow` once https://github.com/rust-lang/rust-clippy/issues/8264 fixed - #[allow(clippy::undocumented_unsafe_blocks)] unsafe { let ptr = self.data.add(index * self.stride); slice::from_raw_parts(ptr, self.cols)