Skip to content

Commit

Permalink
fix clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
fanatid committed Mar 21, 2021
1 parent 283f2cb commit d59028a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ format:
.PHONY: lint
lint:
cargo fmt -- --check
cargo clippy --target wasm32-unknown-unknown
cargo clippy --package secp256k1-node
cargo clippy --package secp256k1-wasm --target wasm32-unknown-unknown
npx prettier -c .

.PHONY: test
Expand Down
5 changes: 4 additions & 1 deletion secp256k1-wasm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ pub static EXTRA_DATA_INPUT: [u8; EXTRA_DATA_SIZE] = [0; EXTRA_DATA_SIZE];
pub static mut SIGNATURE_INPUT: [u8; SIGNATURE_SIZE] = [0; SIGNATURE_SIZE];

macro_rules! jstry {
($value:expr) => {
jstry!($value, ())
};
($value:expr, $ret:expr) => {
match $value {
Ok(value) => value,
Expand Down Expand Up @@ -150,7 +153,7 @@ pub extern "C" fn point_add_scalar(inputlen: usize, outputlen: usize) -> i32 {
#[export_name = "pointCompress"]
pub extern "C" fn point_compress(inputlen: usize, outputlen: usize) {
unsafe {
let pk = jstry!(pubkey_parse(PUBLIC_KEY_INPUT.as_ptr(), inputlen), ());
let pk = jstry!(pubkey_parse(PUBLIC_KEY_INPUT.as_ptr(), inputlen));
pubkey_serialize(&pk, PUBLIC_KEY_INPUT.as_mut_ptr(), outputlen);
}
}
Expand Down
1 change: 1 addition & 0 deletions secp256k1/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#![allow(clippy::missing_safety_doc)]
#![cfg_attr(not(any(test, feature = "std")), no_std)]
#![feature(core_intrinsics)]

Expand Down

0 comments on commit d59028a

Please sign in to comment.