finish current clippy lints to make CI green
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
#![no_std]
|
||||
#![allow(internal_features)]
|
||||
#![feature(core_intrinsics)]
|
||||
#![deny(unsafe_op_in_unsafe_fn)]
|
||||
|
||||
use core::{
|
||||
|
||||
@@ -713,6 +713,7 @@ impl<'a> MmapGuard<'a> {
|
||||
|
||||
Ok(())
|
||||
}
|
||||
#[expect(clippy::mut_from_ref)]
|
||||
pub unsafe fn map_mut_anywhere(
|
||||
fd: &'a FdGuardUpper,
|
||||
offset: usize,
|
||||
|
||||
@@ -953,6 +953,10 @@ impl FdTbl {
|
||||
pub const CONTEXT_MAX_FILES: u32 = 65_536;
|
||||
pub const DEFAULT_CAPACITY: usize = usize::BITS as usize;
|
||||
|
||||
#[expect(
|
||||
clippy::new_without_default,
|
||||
reason = "default not expected for this type"
|
||||
)]
|
||||
pub const fn new() -> Self {
|
||||
Self {
|
||||
fd: None,
|
||||
@@ -1267,6 +1271,10 @@ bitflags::bitflags! {
|
||||
}
|
||||
|
||||
impl PosixFdTbl {
|
||||
#[expect(
|
||||
clippy::new_without_default,
|
||||
reason = "default not expected for this type"
|
||||
)]
|
||||
pub const fn new() -> Self {
|
||||
Self {
|
||||
table: Vec::new(),
|
||||
@@ -1595,6 +1603,10 @@ pub struct UpperFdTbl {
|
||||
}
|
||||
|
||||
impl UpperFdTbl {
|
||||
#[expect(
|
||||
clippy::new_without_default,
|
||||
reason = "default not expected for this type"
|
||||
)]
|
||||
pub const fn new() -> Self {
|
||||
Self {
|
||||
table: Vec::new(),
|
||||
|
||||
@@ -258,6 +258,7 @@ impl<'a, T: Kind> NulStr<'a, T> {
|
||||
/// Scan the string to get its length.
|
||||
#[doc(alias = "strlen")]
|
||||
#[doc(alias = "wcslen")]
|
||||
#[expect(clippy::len_without_is_empty, reason = "len() signature intentional")]
|
||||
pub fn len(self) -> usize {
|
||||
self.to_chars().len()
|
||||
}
|
||||
|
||||
@@ -117,6 +117,7 @@ macro_rules! trace_expr {
|
||||
|
||||
// log::trace! but functions inside them will
|
||||
// not be evaluated or compiled unless enabled
|
||||
#[cfg(target_os = "redox")] // currently only used in redox
|
||||
macro_rules! trace_log {
|
||||
($($arg:tt)+) => {
|
||||
#[cfg(not(feature = "no_trace"))]
|
||||
|
||||
Reference in New Issue
Block a user