Skip to content

Commit 45ca712

Browse files
committed
Use rustc_hex for wasm compatibility
1 parent ca4dc58 commit 45ca712

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ publish = false
88

99
[dependencies]
1010
bn = { git = "https://github.com/cdetrio/bn", branch = "mont-repr-fix" }
11-
rustc-serialize = "0.3"
11+
rustc-hex = "1.0"

src/main.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
extern crate bn;
2-
extern crate rustc_serialize;
2+
extern crate rustc_hex;
33

44
use std::os::raw::c_char;
55
use std::ffi::CStr;
66

7-
use rustc_serialize::hex::FromHex;
8-
use rustc_serialize::hex::ToHex;
7+
use rustc_hex::FromHex;
8+
use rustc_hex::ToHex;
99
use std::io::{self, Read};
1010

1111
#[derive(Debug)]
@@ -45,8 +45,6 @@ fn read_point(reader: &mut io::Chain<&[u8], io::Repeat>) -> Result<::bn::G1, Err
4545
)
4646
}
4747

48-
49-
5048
#[no_mangle]
5149
pub fn ec_mul(input_hex_ptr: *const c_char) -> *const c_char {
5250
use bn::AffineG1;

0 commit comments

Comments
 (0)