From 9eb9ad603fe718395bf092e0b599ec78de9f6f44 Mon Sep 17 00:00:00 2001 From: Malte Tammena Date: Mon, 7 Jun 2021 17:24:43 +0200 Subject: [PATCH] Add `get_mut` annotations (second try) --- nalgebra-sparse/src/cs.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nalgebra-sparse/src/cs.rs b/nalgebra-sparse/src/cs.rs index a5a65f33..cde0a3e2 100644 --- a/nalgebra-sparse/src/cs.rs +++ b/nalgebra-sparse/src/cs.rs @@ -156,6 +156,7 @@ impl CsMatrix { } #[inline] + #[must_use] pub fn get_lane_mut(&mut self, index: usize) -> Option> { let range = self.get_index_range(index)?; let minor_dim = self.pattern().minor_dim(); @@ -429,6 +430,7 @@ impl<'a, T> CsLaneMut<'a, T> { (self.minor_indices, self.values) } + #[must_use] pub fn get_entry_mut(&mut self, global_minor_index: usize) -> Option> { get_mut_entry_from_slices( self.minor_dim,