mirror of
https://github.com/Sunscreen-tech/Sunscreen.git
synced 2026-04-19 03:00:06 -04:00
Address clippy comments (#325)
This commit is contained in:
@@ -163,8 +163,6 @@ where
|
||||
type Output = PolynomialMatrix<R>;
|
||||
|
||||
fn sub(self, rhs: &PolynomialMatrix<R>) -> Self::Output {
|
||||
let rhs = rhs.borrow();
|
||||
|
||||
assert_eq!(self.rows, rhs.rows);
|
||||
assert_eq!(self.cols, rhs.cols);
|
||||
|
||||
@@ -188,8 +186,6 @@ where
|
||||
type Output = Matrix<R>;
|
||||
|
||||
fn add(self, rhs: &Matrix<R>) -> Self::Output {
|
||||
let rhs = rhs.borrow();
|
||||
|
||||
assert_eq!(self.rows, rhs.rows);
|
||||
assert_eq!(self.cols, rhs.cols);
|
||||
|
||||
@@ -284,8 +280,6 @@ where
|
||||
type Output = PolynomialMatrix<R>;
|
||||
|
||||
fn div(self, rhs: &Polynomial<R>) -> Self::Output {
|
||||
let rhs = rhs.borrow();
|
||||
|
||||
let data = self
|
||||
.data
|
||||
.par_iter()
|
||||
|
||||
@@ -513,7 +513,7 @@ where
|
||||
|
||||
impl PartialOrd for SortableEdge {
|
||||
fn partial_cmp(&self, other: &Self) -> Option<std::cmp::Ordering> {
|
||||
self.1.partial_cmp(&other.1)
|
||||
Some(self.cmp(other))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -521,7 +521,7 @@ where
|
||||
fn cmp(&self, other: &Self) -> std::cmp::Ordering {
|
||||
// PartialCmp will always return Some(_) for usize,
|
||||
// which is the thing we're comparing.
|
||||
self.partial_cmp(other).unwrap()
|
||||
self.1.partial_cmp(&other.1).unwrap()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ pub trait Render {
|
||||
|
||||
/**
|
||||
* A supertrait that concisely contains all the traits needed to serve
|
||||
* as an operation for [`NodeInfo`](crate::context::NodeInfo).
|
||||
* as an operation for [`NodeInfo`].
|
||||
*
|
||||
* Also provides functions that describe properties of an operation.
|
||||
*/
|
||||
|
||||
Submodule sunscreen_curve25519 updated: 5542993701...a2bcb78630
@@ -563,7 +563,7 @@ impl<const N: usize, B: ArithmeticBackend<N>> From<i64> for Zq<N, B> {
|
||||
|
||||
impl<const N: usize, B: ArithmeticBackend<N>> PartialOrd for Zq<N, B> {
|
||||
fn partial_cmp(&self, other: &Self) -> Option<std::cmp::Ordering> {
|
||||
self.val.partial_cmp(&other.val)
|
||||
Some(self.cmp(other))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -354,7 +354,7 @@ where
|
||||
.edges_directed(id, Direction::Outgoing)
|
||||
.map(|x| {
|
||||
if !matches!(x.weight(), EdgeInfo::Unary) {
|
||||
return Err(GraphQueryError::NotUnaryOperation)?;
|
||||
Err(GraphQueryError::NotUnaryOperation)?;
|
||||
}
|
||||
|
||||
match prog[x.target()].operation {
|
||||
@@ -380,7 +380,7 @@ where
|
||||
|
||||
impl PartialOrd for SortableEdge {
|
||||
fn partial_cmp(&self, other: &Self) -> Option<std::cmp::Ordering> {
|
||||
self.1.partial_cmp(&other.1)
|
||||
Some(self.cmp(other))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -183,7 +183,7 @@ impl Deref for BigInt {
|
||||
|
||||
impl PartialOrd for BigInt {
|
||||
fn partial_cmp(&self, other: &Self) -> Option<std::cmp::Ordering> {
|
||||
self.0.partial_cmp(&other.0)
|
||||
Some(self.cmp(other))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user