libsm
libsm copied to clipboard
expected `Result<(Point, BigUint), Sm2Error>`, found `(_, _)`
1.配置:
[dependencies] libsm="0.6.0"
- 然后在main.rs中调用的时候 use libsm::sm2::signature::{Pubkey, Seckey, SigCtx, Signature}; fn main() { let ctx = SigCtx::new(); let (pk, sk) = ctx.new_keypair();
}
报错信息如下
error[E0308]: mismatched types
--> src/main.rs:4:9
|
4 | let (pk, sk) = ctx.new_keypair();
| ^^^^^^^^ ----------------- this expression has type Result<(Point, num_bigint::biguint::BigUint), sm2::error::Sm2Error>
| |
| expected Result<(Point, BigUint), Sm2Error>
, found (_, _)
|
= note: expected enum Result<(Point, num_bigint::biguint::BigUint), sm2::error::Sm2Error>