mirror of
https://github.com/bdwgc/bdwgc-rust.git
synced 2026-05-29 09:58:55 -06:00
Apply more Clippy rules (#505)
This commit is contained in:
@@ -15,3 +15,10 @@ cmake = { version = "0.1.55", optional = true }
|
|||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = ["autotools"]
|
default = ["autotools"]
|
||||||
|
|
||||||
|
[lints.clippy]
|
||||||
|
alloc_instead_of_core = "deny"
|
||||||
|
dbg_macro = "deny"
|
||||||
|
missing_const_for_fn = "deny"
|
||||||
|
std_instead_of_alloc = "deny"
|
||||||
|
std_instead_of_core = "deny"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
use std::{
|
use core::{
|
||||||
error,
|
error,
|
||||||
fmt::{self, Display, Formatter},
|
fmt::{self, Display, Formatter},
|
||||||
};
|
};
|
||||||
@@ -9,7 +9,7 @@ pub struct Error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl Error {
|
impl Error {
|
||||||
pub fn new(description: &'static str) -> Error {
|
pub const fn new(description: &'static str) -> Error {
|
||||||
Error { description }
|
Error { description }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ extern crate alloc;
|
|||||||
|
|
||||||
mod error;
|
mod error;
|
||||||
|
|
||||||
use alloc::alloc::{GlobalAlloc, Layout};
|
use core::alloc::{GlobalAlloc, Layout};
|
||||||
use core::ptr::null;
|
use core::ptr::null;
|
||||||
use libc::{c_int, c_void, size_t};
|
use libc::{c_int, c_void, size_t};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user