cargo clippy

This commit is contained in:
collin 2020-12-04 16:47:03 -05:00
parent 0698f5df59
commit f1bd5399a1
3 changed files with 6 additions and 3 deletions

View File

@ -65,7 +65,7 @@ impl Function {
/// Returns `false` otherwise.
///
pub fn contains_self(&self) -> bool {
self.input.iter().find(|param| param.is_self()).is_some()
self.input.iter().any(|param| param.is_self())
}
///
@ -73,7 +73,7 @@ impl Function {
/// Returns `false` otherwise.
///
pub fn contains_mut_self(&self) -> bool {
self.input.iter().find(|param| param.is_mut_self()).is_some()
self.input.iter().any(|param| param.is_mut_self())
}
///

View File

@ -25,6 +25,9 @@ use snarkos_models::{
};
impl<F: Field + PrimeField, G: GroupType<F>> ConstrainedProgram<F, G> {
/// Evaluates a branch of one or more statements and returns a result in
/// the given scope.
#[allow(clippy::too_many_arguments)]
pub fn evaluate_branch<CS: ConstraintSystem<F>>(
&mut self,
cs: &mut CS,

View File

@ -135,7 +135,7 @@ impl FunctionType {
/// Returns `false` otherwise.
///
pub fn contains_self(&self) -> bool {
self.inputs.iter().find(|param| param.is_self()).is_some()
self.inputs.iter().any(|param| param.is_self())
}
///