mirror of
https://github.com/saymrwulf/pasta_curves-source.git
synced 2026-09-04 20:03:39 +00:00
Reduce FieldExt bound to Field for Neg and Sub impls on Expression<F>
This commit is contained in:
parent
5905230174
commit
821bca0abe
1 changed files with 3 additions and 3 deletions
|
|
@ -7,7 +7,7 @@ use std::{
|
||||||
};
|
};
|
||||||
|
|
||||||
use super::{lookup, permutation, Error};
|
use super::{lookup, permutation, Error};
|
||||||
use crate::{arithmetic::FieldExt, poly::Rotation};
|
use crate::poly::Rotation;
|
||||||
|
|
||||||
/// A column type
|
/// A column type
|
||||||
pub trait ColumnType: 'static + Sized {}
|
pub trait ColumnType: 'static + Sized {}
|
||||||
|
|
@ -319,7 +319,7 @@ impl<F: Field> Expression<F> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<F: FieldExt> Neg for Expression<F> {
|
impl<F: Field> Neg for Expression<F> {
|
||||||
type Output = Expression<F>;
|
type Output = Expression<F>;
|
||||||
fn neg(self) -> Self::Output {
|
fn neg(self) -> Self::Output {
|
||||||
Expression::Scaled(Box::new(self), -F::one())
|
Expression::Scaled(Box::new(self), -F::one())
|
||||||
|
|
@ -333,7 +333,7 @@ impl<F> Add for Expression<F> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<F: FieldExt> Sub for Expression<F> {
|
impl<F: Field> Sub for Expression<F> {
|
||||||
type Output = Expression<F>;
|
type Output = Expression<F>;
|
||||||
fn sub(self, rhs: Expression<F>) -> Expression<F> {
|
fn sub(self, rhs: Expression<F>) -> Expression<F> {
|
||||||
Expression::Sum(Box::new(self), Box::new(-rhs))
|
Expression::Sum(Box::new(self), Box::new(-rhs))
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue