Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make ShieldedResult fields public #215

Merged
merged 1 commit into from
Sep 18, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions taiga_halo2/src/transaction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@
#[cfg_attr(feature = "nif", derive(NifStruct))]
#[cfg_attr(feature = "nif", module = "Taiga.Transaction.Result")]
pub struct ShieldedResult {
anchors: Vec<pallas::Base>,
nullifiers: Vec<Nullifier>,
output_cms: Vec<pallas::Base>,
pub anchors: Vec<pallas::Base>,
pub nullifiers: Vec<Nullifier>,
pub output_cms: Vec<pallas::Base>,
}

#[derive(Debug, Clone)]
Expand Down Expand Up @@ -228,9 +228,9 @@
transaction().encode(env),
self.shielded_ptx_bundle.encode(env),
borsh::to_vec(&self.transparent_ptx_bundle)
.unwrap_or(vec![])

Check warning on line 231 in taiga_halo2/src/transaction.rs

View workflow job for this annotation

GitHub Actions / Clippy (beta)

use of `unwrap_or` to construct default value

warning: use of `unwrap_or` to construct default value --> taiga_halo2/src/transaction.rs:231:18 | 231 | .unwrap_or(vec![]) | ^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default = note: `-W clippy::unwrap-or-default` implied by `-W clippy::all`

Check warning on line 231 in taiga_halo2/src/transaction.rs

View workflow job for this annotation

GitHub Actions / Clippy (beta)

use of `unwrap_or` to construct default value

warning: use of `unwrap_or` to construct default value --> taiga_halo2/src/transaction.rs:231:18 | 231 | .unwrap_or(vec![]) | ^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default = note: `-W clippy::unwrap-or-default` implied by `-W clippy::all`
.encode(env),
borsh::to_vec(&self.signature).unwrap_or(vec![]).encode(env),

Check warning on line 233 in taiga_halo2/src/transaction.rs

View workflow job for this annotation

GitHub Actions / Clippy (beta)

use of `unwrap_or` to construct default value

warning: use of `unwrap_or` to construct default value --> taiga_halo2/src/transaction.rs:233:44 | 233 | borsh::to_vec(&self.signature).unwrap_or(vec![]).encode(env), | ^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default

Check warning on line 233 in taiga_halo2/src/transaction.rs

View workflow job for this annotation

GitHub Actions / Clippy (beta)

use of `unwrap_or` to construct default value

warning: use of `unwrap_or` to construct default value --> taiga_halo2/src/transaction.rs:233:44 | 233 | borsh::to_vec(&self.signature).unwrap_or(vec![]).encode(env), | ^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default
)
.encode(env)
}
Expand Down
Loading