Skip to content

Commit 0e47aa9

Browse files
committed
Fix clippy warnings
Clippy default settings seemed to have changed introducing a few new warnings. warning: variable does not need to be mutable warning: deref on an immutable reference warning: returning the result of a `let` binding from a block Fix them all in a single patch because CI has to pass for each patch.
1 parent 7fde332 commit 0e47aa9

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/context.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,8 @@ mod alloc_only {
189189
/// # }
190190
/// ```
191191
#[cfg_attr(not(feature = "rand-std"), allow(clippy::let_and_return, unused_mut))]
192+
#[allow(unused_mut)] // ctx is not mutated under some feature combinations.
193+
#[allow(clippy::let_and_return)] // ctx as for unused_mut
192194
pub fn gen_new() -> Secp256k1<C> {
193195
#[cfg(target_arch = "wasm32")]
194196
ffi::types::sanity_checks_for_wasm();

src/ecdsa/serialized_signature.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ impl PartialEq for SerializedSignature {
4545
impl AsRef<[u8]> for SerializedSignature {
4646
#[inline]
4747
fn as_ref(&self) -> &[u8] {
48-
&*self
48+
self
4949
}
5050
}
5151

0 commit comments

Comments
 (0)