Skip to content

Commit e469096

Browse files
committed
disable missing_const_for_fn lint globally
1 parent aa48844 commit e469096

File tree

5 files changed

+1
-5
lines changed

5 files changed

+1
-5
lines changed

src/compat.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ impl Utf8Error {
3232
/// ...
3333
#[inline]
3434
#[must_use]
35-
#[allow(clippy::missing_const_for_fn)] // would not provide any benefit
3635
pub fn valid_up_to(&self) -> usize {
3736
self.valid_up_to
3837
}

src/implementation/aarch64/neon.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,6 @@ unsafe fn simd_prefetch(ptr: *const u8) {
236236

237237
#[inline]
238238
#[cfg(not(feature = "aarch64_neon_prefetch"))]
239-
#[allow(clippy::missing_const_for_fn)]
240239
unsafe fn simd_prefetch(_ptr: *const u8) {}
241240

242241
const PREFETCH: bool = false;

src/implementation/helpers.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ pub(crate) fn get_compat_error(input: &[u8], failing_block_pos: usize) -> Utf8Er
3838
}
3939

4040
#[allow(dead_code)]
41-
#[allow(clippy::missing_const_for_fn)] // clippy is wrong, it cannot really be const
4241
pub(crate) unsafe fn memcpy_unaligned_nonoverlapping_inline_opt_lt_64(
4342
mut src: *const u8,
4443
mut dest: *mut u8,

src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
#![allow(clippy::redundant_else)] // can make code more readable
1212
#![allow(clippy::explicit_iter_loop)] // can make code more readable
1313
#![allow(clippy::semicolon_if_nothing_returned)] // see https://github.com/rust-lang/rust-clippy/issues/7768
14+
#![allow(clippy::missing_const_for_fn)] // not necessary most of the times
1415
#![deny(missing_docs)]
1516
#![cfg_attr(not(feature = "std"), no_std)]
1617
#![cfg_attr(docsrs, feature(doc_cfg))]

tests/tests.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,6 @@ fn test_chunked_streaming_with_chunk_size<T: simdutf8::basic::imp::ChunkedUtf8Va
107107
}
108108

109109
#[cfg(feature = "public_imp")]
110-
#[allow(clippy::missing_const_for_fn)]
111110
#[allow(unused_variables)]
112111
fn test_valid_public_imp(input: &[u8]) {
113112
if cfg!(any(target_arch = "x86", target_arch = "x86_64")) {
@@ -175,7 +174,6 @@ fn test_invalid(input: &[u8], valid_up_to: usize, error_len: Option<usize>) {
175174
}
176175

177176
#[cfg(feature = "public_imp")]
178-
#[allow(clippy::missing_const_for_fn)]
179177
#[allow(unused_variables)]
180178
fn test_invalid_public_imp(input: &[u8], valid_up_to: usize, error_len: Option<usize>) {
181179
if cfg!(any(target_arch = "x86", target_arch = "x86_64")) {

0 commit comments

Comments
 (0)