dimforge / alga

Abstract algebra for Rust.
194 stars 39 forks source link

unnecessary parentheses around function argument #35

Closed wcbeard closed 6 years ago

wcbeard commented 6 years ago

Extra parens at alga/alga/src/linear/transformation.rs:371:14 keep the library from compiling. Some((b.norm() / a.norm())) -> Some(b.norm() / a.norm()) fixes it.

Error message
cargo build
   Compiling alga v0.5.2 (file:///Users/wbeard/repos/proto/hello_alg/alga/alga)
warning: unused macro definition
   --> alga/alga/src/macros.rs:143:1
    |
143 | / macro_rules! impl_approx_eq {
144 | |     ($V:expr; $($T:ty),* $(,)*) => {
145 | |         $(impl ApproxEq for $T {
146 | |             type Eps = $T;
...   |
158 | |     }
159 | | }
    | |_^
    |
    = note: #[warn(unused_macros)] on by default

warning: unused macro definition
  --> alga/alga/src/general/one_operator.rs:84:1
   |
84 | / macro_rules! impl_quasigroup(
85 | |     (<$M:ty> for $($T:tt)+) => {
86 | |         impl_marker!($crate::general::AbstractQuasigroup<$M>; $($T)+);
87 | |     }
88 | | );
   | |__^

warning: unused macro definition
   --> alga/alga/src/general/one_operator.rs:184:1
    |
184 | / macro_rules! impl_loop(
185 | |     (<$M:ty> for $($T:tt)+) => {
186 | |         impl_quasigroup!(<$M> for $($T)+);
187 | |         impl_marker!($crate::general::AbstractLoop<$M>; $($T)+);
188 | |     }
189 | | );
    | |__^

error: unnecessary parentheses around function argument
   --> alga/alga/src/linear/transformation.rs:371:14
    |
371 |         Some((b.norm() / a.norm()))
    |              ^^^^^^^^^^^^^^^^^^^^^ help: remove these parentheses
    |
note: lint level defined here
   --> alga/alga/src/lib.rs:18:9
    |
18  | #![deny(unused_parens)]
    |         ^^^^^^^^^^^^^

error: aborting due to previous error

error: Could not compile `alga`.

To learn more, run the command again with --verbose.