mirror of https://github.com/zcash/halo2.git
Implement AsRef for Proof
This commit is contained in:
parent
a08d060725
commit
7ea8900a58
|
@ -120,9 +120,9 @@ impl Instance {
|
|||
#[derive(Debug)]
|
||||
pub struct Proof(pub(crate) Vec<u8>);
|
||||
|
||||
impl<'a> From<&'a Proof> for &'a Vec<u8> {
|
||||
fn from(proof: &'a Proof) -> &'a Vec<u8> {
|
||||
&proof.0
|
||||
impl AsRef<[u8]> for Proof {
|
||||
fn as_ref(&self) -> &[u8] {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -163,7 +163,7 @@ impl Proof {
|
|||
}
|
||||
}
|
||||
|
||||
/// Construct a new Proof value.
|
||||
/// Constructs a new Proof value.
|
||||
pub fn new(bytes: Vec<u8>) -> Self {
|
||||
Proof(bytes)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue