From f12a3aa5493dc93b64faf6f97f982bbe1099de9b Mon Sep 17 00:00:00 2001 From: Mathieu Poumeyrol Date: Mon, 23 Oct 2023 16:20:56 +0200 Subject: [PATCH] clippy --- cli/src/params.rs | 2 +- core/src/ops/array/gather.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cli/src/params.rs b/cli/src/params.rs index 7e20683dc9..5f6e3b8730 100644 --- a/cli/src/params.rs +++ b/cli/src/params.rs @@ -662,7 +662,7 @@ impl Parameters { m.analyse(!matches.is_present("analyse-fail-fast")).map_err(|e| ModelBuildingError(Box::new(m.clone()), e.into()) )?; - if let Some(fail) = m.missing_type_shape()?.iter().next() { + if let Some(fail) = m.missing_type_shape()?.first() { bail!(ModelBuildingError(Box::new(m.clone()), format!("{} has incomplete typing", m.node(fail.node)).into())) } Ok(m) diff --git a/core/src/ops/array/gather.rs b/core/src/ops/array/gather.rs index 5a26b2592d..656995db72 100644 --- a/core/src/ops/array/gather.rs +++ b/core/src/ops/array/gather.rs @@ -31,7 +31,7 @@ impl Gather { let indices = indices.cast_to::()?; let indices = indices.to_array_view::()?; let output_shape = &*self.compute_output_shape(data.shape(), indices.shape())?; - let mut output = Tensor::uninitialized::(&output_shape)?; + let mut output = Tensor::uninitialized::(output_shape)?; let mut output_view = output.to_array_view_mut::()?; for coords in tract_ndarray::indices(output_shape) { let ocoords = coords.as_array_view();