Apply more Clippy rules (#505)

This commit is contained in:
Yota Toyama authored and GitHub committed 2025-12-15 07:16:09 +00:00
1 parent 9601345035
commit 667bba4e3c
3 files changed
+10 -3

No files matched your search

+2 -2
View File
@@ -1,4 +1,4 @@
use std::{
use core::{
error,
fmt::{self, Display, Formatter},
};
@@ -9,7 +9,7 @@ pub struct Error {
}
impl Error {
pub fn new(description: &'static str) -> Error {
pub const fn new(description: &'static str) -> Error {
Error { description }
}
}
+1 -1
View File
@@ -4,7 +4,7 @@ extern crate alloc;
mod error;
use alloc::alloc::{GlobalAlloc, Layout};
use core::alloc::{GlobalAlloc, Layout};
use core::ptr::null;
use libc::{c_int, c_void, size_t};