Clippy lints

This commit is contained in:
2021-08-16 20:33:57 +00:00
parent 4d44b4a74a
commit 2d473b8255
8 changed files with 14 additions and 5 deletions

View File

@@ -5,6 +5,7 @@ use super::GAMMA;
use ndarray::{azip, ArrayView, ArrayViewMut, Dimension};
pub trait Evaluator<D: Dimension>: Send + Sync {
#[allow(clippy::too_many_arguments)]
fn evaluate(
&self,
t: Float,
@@ -55,6 +56,7 @@ pub trait EvaluatorPressure<D: Dimension>: Send + Sync {
rho: ArrayView<Float, D>,
out: ArrayViewMut<Float, D>,
);
#[allow(clippy::too_many_arguments)]
fn p(
&self,
t: Float,
@@ -70,6 +72,7 @@ pub trait EvaluatorPressure<D: Dimension>: Send + Sync {
impl<'a, D: Dimension, BP: EvaluatorPressure<D>> Evaluator<D>
for EvaluatorPressureWrapper<'a, D, BP>
{
#[allow(clippy::many_single_char_names)]
fn evaluate(
&self,
t: Float,

View File

@@ -330,6 +330,7 @@ impl Field {
let (rho, rhou, rhov, e) = self.components_mut();
vortex_param.evaluate(time, x, y, rho, rhou, rhov, e)
}
#[allow(clippy::erasing_op, clippy::identity_op)]
fn iter(&self) -> impl ExactSizeIterator<Item = FieldValue> + '_ {
let n = self.nx() * self.ny();
let slice = self.0.as_slice().unwrap();