mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-08 04:09:23 +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
|
// Use black_box when possible
|
||||||
#[rustversion::since(1.66)]
|
#[rustversion::since(1.66)]
|
||||||
use core::hint::black_box;
|
mod black_box {
|
||||||
#[rustversion::before(1.66)]
|
pub(crate) fn black_box<T>(val: T) -> T {
|
||||||
fn black_box<T>(val: T) -> T {
|
#[allow(clippy::incompatible_msrv)]
|
||||||
val
|
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 {
|
pub(crate) fn u8_from_bool(bit_ref: &mut bool) -> u8 {
|
||||||
let bit_ref = black_box(bit_ref);
|
let bit_ref = black_box(bit_ref);
|
||||||
|
|||||||
Reference in New Issue
Block a user