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

Add serialize traits to LabeledCommitment #122

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ keywords = ["cryptography", "commitments", "elliptic-curves", "pairing"]
categories = ["cryptography"]
include = ["Cargo.toml", "src", "README.md", "LICENSE-APACHE", "LICENSE-MIT"]
license = "MIT/Apache-2.0"
edition = "2018"
edition = "2021"

[dependencies]
ark-serialize = { version = "^0.4.0", default-features = false, features = [ "derive" ] }
Expand Down
6 changes: 3 additions & 3 deletions src/data_structures.rs
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ impl<'a, F: Field, P: Polynomial<F>> LabeledPolynomial<F, P> {
}

/// A commitment along with information about its degree bound (if any).
#[derive(Clone)]
#[derive(Clone, CanonicalSerialize, CanonicalDeserialize)]
pub struct LabeledCommitment<C: PCCommitment> {
label: PolynomialLabel,
commitment: C,
Expand Down Expand Up @@ -250,7 +250,7 @@ impl<'a> From<&'a str> for LCTerm {
}
}

impl core::convert::TryInto<PolynomialLabel> for LCTerm {
impl TryInto<PolynomialLabel> for LCTerm {
type Error = ();
fn try_into(self) -> Result<PolynomialLabel, ()> {
match self {
Expand All @@ -260,7 +260,7 @@ impl core::convert::TryInto<PolynomialLabel> for LCTerm {
}
}

impl<'a> core::convert::TryInto<&'a PolynomialLabel> for &'a LCTerm {
impl<'a> TryInto<&'a PolynomialLabel> for &'a LCTerm {
type Error = ();

fn try_into(self) -> Result<&'a PolynomialLabel, ()> {
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#![cfg_attr(not(feature = "std"), no_std)]
//! A crate for polynomial commitment schemes.
#![deny(unused_import_braces, unused_qualifications, trivial_casts)]
#![deny(trivial_numeric_casts, private_in_public, variant_size_differences)]
#![deny(trivial_numeric_casts, variant_size_differences)]
#![deny(stable_features, unreachable_pub, non_shorthand_field_patterns)]
#![deny(unused_attributes, unused_mut)]
#![deny(missing_docs)]
Expand Down