Skip to content

Commit

Permalink
Remove FieldExt
Browse files Browse the repository at this point in the history
  • Loading branch information
cronokirby committed Feb 7, 2024
1 parent 737a685 commit c8f6a6c
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 33 deletions.
31 changes: 0 additions & 31 deletions src/field_ext.rs

This file was deleted.

4 changes: 4 additions & 0 deletions src/fields/fp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,10 @@ impl Fp {
Err(EncodingError::InvalidEncoding)
}
}

pub fn to_bytes(&self) -> [u8; N_8] {
self.to_bytes_le()
}
}

#[cfg(test)]
Expand Down
4 changes: 4 additions & 0 deletions src/fields/fq.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,10 @@ impl Fq {
Err(EncodingError::InvalidEncoding)
}
}

pub fn to_bytes(&self) -> [u8; N_8] {
self.to_bytes_le()
}
}

#[cfg(test)]
Expand Down
4 changes: 4 additions & 0 deletions src/fields/fr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,10 @@ impl Fr {
Err(EncodingError::InvalidEncoding)
}
}

pub fn to_bytes(&self) -> [u8; N_8] {
self.to_bytes_le()
}
}

#[cfg(test)]
Expand Down
2 changes: 0 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ use cfg_if::cfg_if;

pub mod fields;
pub use fields::{fp::Fp, fq::Fq, fr::Fr};
mod field_ext;
pub use field_ext::FieldExt;
mod sign;

mod error;
Expand Down

0 comments on commit c8f6a6c

Please sign in to comment.