libsm icon indicating copy to clipboard operation
libsm copied to clipboard

expected `Result<(Point, BigUint), Sm2Error>`, found `(_, _)`

Open hallowsman opened this issue 7 months ago • 0 comments

1.配置:

[dependencies] libsm="0.6.0"

  1. 然后在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>

hallowsman avatar Jul 01 '24 08:07 hallowsman