mirror of
https://github.com/logos-storage/plonky2.git
synced 2026-01-09 01:03:08 +00:00
12 lines
195 B
Rust
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
|
|
}
|
|
}
|