diff --git a/src/functions/select.rs b/src/functions/select.rs index c8364f8..d2796a9 100644 --- a/src/functions/select.rs +++ b/src/functions/select.rs @@ -13,7 +13,7 @@ pub fn select(axis: usize, indices: Vec, x: &ComputedNDA) -> ComputedNDA false, "select", move |xs, ys, gys| { - drop(ys); + let _ = ys; let mut gx = NDArray::zeros(xs[0].shape()); for i in 0..indices.len() { gx.index_axis_mut(Axis(axis), indices[i]) diff --git a/src/optimizers/fixed.rs b/src/optimizers/fixed.rs index 2630831..c071693 100644 --- a/src/optimizers/fixed.rs +++ b/src/optimizers/fixed.rs @@ -13,7 +13,7 @@ impl Optimizer for Fixed { type State = (); fn new_state(&self, shape: &[usize]) -> Self::State { - drop(shape); + let _ = shape; () } diff --git a/src/optimizers/sgd.rs b/src/optimizers/sgd.rs index a6fc53f..64d75c6 100644 --- a/src/optimizers/sgd.rs +++ b/src/optimizers/sgd.rs @@ -17,12 +17,12 @@ impl Optimizer for SGD { type State = (); fn new_state(&self, shape: &[usize]) -> Self::State { - drop(shape); + let _ = shape; () } fn update(&mut self, data: &mut NDArray, state: &mut Self::State, grad: &NDArray) { - drop(state); + let _ = state; *data = &*data + grad.mul(scalar(-self.learning_rate)); } }