Allow let_and_return for feature guarded code
Clippy emits: warning: returning the result of a `let` binding from a block This is due to feature guarded code, add 'allow' attribute. Use `cfg_attr` to restrict the allow to when it is needed. Add the already present `unused_mut` inside the `cfg_attr` guard also.
This commit is contained in:
parent
d64132cd4b
commit
42de876e01
|
@ -188,7 +188,7 @@ mod alloc_only {
|
||||||
/// ctx.seeded_randomize(&seed);
|
/// ctx.seeded_randomize(&seed);
|
||||||
/// # }
|
/// # }
|
||||||
/// ```
|
/// ```
|
||||||
#[allow(unused_mut)] // Unused when `rand-std` is not enabled.
|
#[cfg_attr(not(feature = "rand-std"), allow(clippy::let_and_return, unused_mut))]
|
||||||
pub fn gen_new() -> Secp256k1<C> {
|
pub fn gen_new() -> Secp256k1<C> {
|
||||||
#[cfg(target_arch = "wasm32")]
|
#[cfg(target_arch = "wasm32")]
|
||||||
ffi::types::sanity_checks_for_wasm();
|
ffi::types::sanity_checks_for_wasm();
|
||||||
|
|
Loading…
Reference in New Issue