diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 3ba97ef..fdeb90d 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -1,6 +1,6 @@ name: Rust -on: [push] +on: [push, pull_request] jobs: test: diff --git a/librustzcash/src/rustzcash.rs b/librustzcash/src/rustzcash.rs index 14b5f00..6aeb35a 100644 --- a/librustzcash/src/rustzcash.rs +++ b/librustzcash/src/rustzcash.rs @@ -169,7 +169,7 @@ pub extern "system" fn librustzcash_init_zksnark_params( let sprout_path = if sprout_path.is_null() { None } else { - Some(OsStr::from_wide(unsafe { + Some(OsString::from_wide(unsafe { slice::from_raw_parts(sprout_path, sprout_path_len) })) }; @@ -179,7 +179,7 @@ pub extern "system" fn librustzcash_init_zksnark_params( spend_hash, Path::new(&output_path), output_hash, - Path::new(&sprout_path), + sprout_path.as_ref().map(|p| Path::new(p)), sprout_hash, ) }