mirror of
https://github.com/saymrwulf/risc0-curve25519-dalek-source.git
synced 2026-09-04 20:03:40 +00:00
Implement Debug for Scalar
This commit is contained in:
parent
1dac2f53bb
commit
950519b97b
1 changed files with 8 additions and 2 deletions
|
|
@ -30,8 +30,8 @@
|
|||
//! limbs.
|
||||
|
||||
use core::cmp::{Eq, PartialEq};
|
||||
use core::ops::{Index, IndexMut};
|
||||
use core::ops::{Neg};
|
||||
use core::ops::{Neg, Index, IndexMut};
|
||||
use core::fmt::Debug;
|
||||
|
||||
#[cfg(feature = "std")]
|
||||
use rand::Rng;
|
||||
|
|
@ -50,6 +50,12 @@ use subtle::arrays_equal_ct;
|
|||
#[derive(Copy, Clone)]
|
||||
pub struct Scalar(pub [u8; 32]);
|
||||
|
||||
impl Debug for Scalar {
|
||||
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
|
||||
write!(f, "Scalar: {:?}", &self.0[..])
|
||||
}
|
||||
}
|
||||
|
||||
impl Eq for Scalar{}
|
||||
impl PartialEq for Scalar {
|
||||
/// Test equality between two `Scalar`s.
|
||||
|
|
|
|||
Loading…
Reference in a new issue