From bda8207ffd4900d67f7c1ca776390c1289609495 Mon Sep 17 00:00:00 2001 From: Andreas Longva Date: Tue, 26 Jan 2021 09:28:15 +0100 Subject: [PATCH] Rename to_value to into_value (clippy suggestion) --- nalgebra-sparse/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nalgebra-sparse/src/lib.rs b/nalgebra-sparse/src/lib.rs index 04b93091..1de835c7 100644 --- a/nalgebra-sparse/src/lib.rs +++ b/nalgebra-sparse/src/lib.rs @@ -226,7 +226,7 @@ impl<'a, T: Clone + Zero> SparseEntry<'a, T> { /// /// Either clones the underlying reference or returns zero if the entry is not explicitly /// stored. - pub fn to_value(self) -> T { + pub fn into_value(self) -> T { match self { SparseEntry::NonZero(value) => value.clone(), SparseEntry::Zero => T::zero(), @@ -253,7 +253,7 @@ impl<'a, T: Clone + Zero> SparseEntryMut<'a, T> { /// /// Either clones the underlying reference or returns zero if the entry is not explicitly /// stored. - pub fn to_value(self) -> T { + pub fn into_value(self) -> T { match self { SparseEntryMut::NonZero(value) => value.clone(), SparseEntryMut::Zero => T::zero(),