plonky2/field/src/ops.rs
Brandon H. Gomes 7a81c5d46a
feat: move to alloc for Vec/String/Box
Signed-off-by: Brandon H. Gomes <bhgomes@pm.me>
2022-11-02 19:59:12 -07:00

12 lines
195 B
Rust

use core::ops::Mul;
pub trait Square {
fn square(&self) -> Self;
}
impl<F: Mul<F, Output = Self> + Copy> Square for F {
default fn square(&self) -> Self {
*self * *self
}
}