Skip to content

clippy: fix upcoming nightly lints #1675

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 19, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions uefi/src/data_types/strs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ pub enum FromSliceUntilNulError {
impl Display for FromSliceUntilNulError {
fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {
match self {
Self::InvalidChar(usize) => write!(f, "invalid character at index {}", usize),
Self::InvalidChar(usize) => write!(f, "invalid character at index {usize}"),
Self::NoNul => write!(f, "no nul character"),
}
}
Expand All @@ -56,8 +56,8 @@ pub enum FromSliceWithNulError {
impl Display for FromSliceWithNulError {
fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {
match self {
Self::InvalidChar(usize) => write!(f, "invalid character at index {}", usize),
Self::InteriorNul(usize) => write!(f, "interior null character at index {}", usize),
Self::InvalidChar(usize) => write!(f, "invalid character at index {usize}"),
Self::InteriorNul(usize) => write!(f, "interior null character at index {usize}"),
Self::NotNulTerminated => write!(f, "not null-terminated"),
}
}
Expand Down Expand Up @@ -85,8 +85,8 @@ pub enum UnalignedCStr16Error {
impl Display for UnalignedCStr16Error {
fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {
match self {
Self::InvalidChar(usize) => write!(f, "invalid character at index {}", usize),
Self::InteriorNul(usize) => write!(f, "interior null character at index {}", usize),
Self::InvalidChar(usize) => write!(f, "invalid character at index {usize}"),
Self::InteriorNul(usize) => write!(f, "interior null character at index {usize}"),
Self::NotNulTerminated => write!(f, "not null-terminated"),
Self::BufferTooSmall => write!(f, "buffer too small"),
}
Expand All @@ -112,8 +112,8 @@ pub enum FromStrWithBufError {
impl Display for FromStrWithBufError {
fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {
match self {
Self::InvalidChar(usize) => write!(f, "invalid character at index {}", usize),
Self::InteriorNul(usize) => write!(f, "interior null character at index {}", usize),
Self::InvalidChar(usize) => write!(f, "invalid character at index {usize}"),
Self::InteriorNul(usize) => write!(f, "interior null character at index {usize}"),
Self::BufferTooSmall => write!(f, "buffer too small"),
}
}
Expand Down
2 changes: 1 addition & 1 deletion uefi/src/proto/driver/component_name.rs
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ pub enum LanguageError {
impl Display for LanguageError {
fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {
match self {
Self::Ascii { index } => write!(f, "invalid character at index: {}", index),
Self::Ascii { index } => write!(f, "invalid character at index: {index}"),
}
}
}
Expand Down
3 changes: 1 addition & 2 deletions uefi/src/proto/media/file/info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,7 @@ impl Display for FileInfoCreationError {
match self {
Self::InsufficientStorage(bytes) => write!(
f,
"provided buffer was too small. need at least {} bytes",
bytes
"provided buffer was too small. need at least {bytes} bytes"
),
}
}
Expand Down