mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-08 12:19:24 +00:00
Fix clippy lint for ed448 on optional compilation path
This commit is contained in:
@@ -2,11 +2,19 @@ use zeroize::Zeroize;
|
||||
|
||||
// Use black_box when possible
|
||||
#[rustversion::since(1.66)]
|
||||
use core::hint::black_box;
|
||||
#[rustversion::before(1.66)]
|
||||
fn black_box<T>(val: T) -> T {
|
||||
val
|
||||
mod black_box {
|
||||
pub(crate) fn black_box<T>(val: T) -> T {
|
||||
#[allow(clippy::incompatible_msrv)]
|
||||
core::hint::black_box(val)
|
||||
}
|
||||
}
|
||||
#[rustversion::before(1.66)]
|
||||
mod black_box {
|
||||
pub(crate) fn black_box<T>(val: T) -> T {
|
||||
val
|
||||
}
|
||||
}
|
||||
use black_box::black_box;
|
||||
|
||||
pub(crate) fn u8_from_bool(bit_ref: &mut bool) -> u8 {
|
||||
let bit_ref = black_box(bit_ref);
|
||||
|
||||
Reference in New Issue
Block a user