From 85c67b5544526823f7955e6161878333bf3a0454 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Crozet?= Date: Fri, 31 Jan 2014 15:26:25 +0100 Subject: [PATCH] Activate the unused_results lint. --- src/lib.rs | 1 + src/structs/dvec.rs | 2 +- src/structs/vec_macros.rs | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 4cec25c4..38c0f408 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -102,6 +102,7 @@ Feel free to add your project to this list if you happen to use **nalgebra**! #[deny(unnecessary_parens)]; #[deny(non_uppercase_statics)]; #[deny(unnecessary_qualification)]; +#[deny(unused_result)]; #[warn(missing_doc)]; #[feature(macro_rules)]; #[doc(html_root_url = "http://www.rust-ci.org/sebcrozet/nalgebra/doc")]; diff --git a/src/structs/dvec.rs b/src/structs/dvec.rs index edbfa701..802cfa9d 100644 --- a/src/structs/dvec.rs +++ b/src/structs/dvec.rs @@ -299,7 +299,7 @@ impl Norm for DVec { fn normalize_cpy(v: &DVec) -> DVec { let mut res : DVec = v.clone(); - res.normalize(); + let _ = res.normalize(); res } diff --git a/src/structs/vec_macros.rs b/src/structs/vec_macros.rs index 488997be..9c105265 100644 --- a/src/structs/vec_macros.rs +++ b/src/structs/vec_macros.rs @@ -448,7 +448,7 @@ macro_rules! norm_impl( fn normalize_cpy(v: &$t) -> $t { let mut res : $t = v.clone(); - res.normalize(); + let _ = res.normalize(); res }