Skip to content

Commit 7d80526

Browse files
committed
Fix clippy lints
1 parent 9bedd00 commit 7d80526

File tree

4 files changed

+16
-7
lines changed

4 files changed

+16
-7
lines changed

necsim/impls/no-std/src/cogs/habitat/wrapping_noise/opensimplex_noise/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,13 @@ impl OpenSimplexNoise {
5353
}
5454

5555
#[must_use]
56+
#[allow(dead_code)] // FIXME: use expect
5657
pub fn eval_3d<M: MathsCore>(&self, x: f64, y: f64, z: f64, wrap: f64) -> f64 {
5758
OpenSimplexNoise3D::eval::<M>(Vec3::new(x, y, z), &self.perm, wrap)
5859
}
5960

6061
#[must_use]
62+
#[allow(dead_code)] // FIXME: use expect
6163
pub fn eval_4d<M: MathsCore>(&self, x: f64, y: f64, z: f64, w: f64, wrap: f64) -> f64 {
6264
OpenSimplexNoise4D::eval::<M>(Vec4::new(x, y, z, w), &self.perm, wrap)
6365
}

rustcoalescence/src/args/config/rng/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ impl<M: MathsCore, G: RngCore<M>> From<G> for Base32RngState<M, G> {
8282
}
8383

8484
impl<M: MathsCore, G: RngCore<M>> Base32RngState<M, G> {
85+
#[allow(dead_code)] // FIXME: use expect
8586
#[must_use]
8687
pub fn into(self) -> G {
8788
self.rng

rustcoalescence/src/cli/simulate/parse/algorithm.rs

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,23 @@ pub(in super::super) fn parse_and_normalise(
1212
normalised_args: &mut BufferingSimulateArgsBuilder,
1313
partitioning: &Partitioning,
1414
) -> anyhow::Result<Algorithm> {
15-
let SimulateArgsAlgorithmOnly { algorithm } =
15+
let lint::SimulateArgsAlgorithmOnly { algorithm } =
1616
try_parse_state("simulate", ron_args, &mut partitioning.get_size())?;
1717

1818
normalised_args.algorithm(&algorithm);
1919

2020
Ok(algorithm)
2121
}
2222

23-
#[derive(DeserializeState)]
24-
#[serde(deserialize_state = "PartitionSize")]
25-
#[serde(rename = "Simulate")]
26-
struct SimulateArgsAlgorithmOnly {
27-
#[serde(deserialize_state)]
28-
algorithm: Algorithm,
23+
#[allow(unreachable_patterns)] // FIXME: use expect
24+
mod lint {
25+
use super::{Algorithm, PartitionSize};
26+
27+
#[derive(DeserializeState)]
28+
#[serde(deserialize_state = "PartitionSize")]
29+
#[serde(rename = "Simulate")]
30+
pub struct SimulateArgsAlgorithmOnly {
31+
#[serde(deserialize_state)]
32+
pub algorithm: Algorithm,
33+
}
2934
}

rustcoalescence/src/reporter.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ impl<ReportSpeciation: Boolean, ReportDispersal: Boolean, ReportProgress: Boolea
2727
impl<ReportSpeciation: Boolean, ReportDispersal: Boolean, ReportProgress: Boolean>
2828
DynamicReporterContext<ReportSpeciation, ReportDispersal, ReportProgress>
2929
{
30+
#[allow(dead_code)] // FIXME: use expect
3031
pub fn new(
3132
reporter: ReporterPluginVec<ReportSpeciation, ReportDispersal, ReportProgress>,
3233
) -> Self {

0 commit comments

Comments
 (0)