Skip to content

Draft for a Sop implementation #39

Draft for a Sop implementation

Draft for a Sop implementation #39

GitHub Actions / Clippy Output succeeded Dec 11, 2023 in 0s

Clippy Output

7 warnings

Details

Results

Message level Amount
Internal compiler error 0
Error 0
Warning 7
Note 0
Help 0

Versions

  • rustc 1.74.1 (a28077b28 2023-12-04)
  • cargo 1.74.1 (ecb9851af 2023-10-18)
  • clippy 0.1.74 (a28077b 2023-12-04)

Annotations

Check warning on line 272 in src/canonization.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy Output

the loop variable `i` is used to index `res_perm`

warning: the loop variable `i` is used to index `res_perm`
   --> src/canonization.rs:272:14
    |
272 |     for i in 0..res_perm.len() {
    |              ^^^^^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop
help: consider using an iterator and enumerate()
    |
272 |     for (i, <item>) in res_perm.iter_mut().enumerate() {
    |         ~~~~~~~~~~~    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Check warning on line 233 in src/canonization.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy Output

the variable `ind` is used as a loop counter

warning: the variable `ind` is used as a loop counter
   --> src/canonization.rs:233:5
    |
233 |     for swap in all_swaps {
    |     ^^^^^^^^^^^^^^^^^^^^^ help: consider using: `for (ind, swap) in all_swaps.iter().enumerate()`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop

Check warning on line 229 in src/canonization.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy Output

the loop variable `i` is used to index `res_perm`

warning: the loop variable `i` is used to index `res_perm`
   --> src/canonization.rs:229:14
    |
229 |     for i in 0..res_perm.len() {
    |              ^^^^^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop
help: consider using an iterator and enumerate()
    |
229 |     for (i, <item>) in res_perm.iter_mut().enumerate() {
    |         ~~~~~~~~~~~    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Check warning on line 163 in src/canonization.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy Output

the variable `ind` is used as a loop counter

warning: the variable `ind` is used as a loop counter
   --> src/canonization.rs:163:5
    |
163 |     for swap in all_swaps {
    |     ^^^^^^^^^^^^^^^^^^^^^ help: consider using: `for (ind, swap) in all_swaps.iter().enumerate()`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop
    = note: `#[warn(clippy::explicit_counter_loop)]` on by default

Check warning on line 117 in src/canonization.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy Output

the loop variable `i` is used to index `all_perms`

warning: the loop variable `i` is used to index `all_perms`
   --> src/canonization.rs:117:18
    |
117 |         for i in 0..all_perms.len() {
    |                  ^^^^^^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop
    = note: `#[warn(clippy::needless_range_loop)]` on by default
help: consider using an iterator and enumerate()
    |
117 |         for (i, <item>) in all_perms.iter().enumerate() {
    |             ~~~~~~~~~~~    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Check warning on line 134 in src/sop.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy Output

multiple associated items are never used

warning: multiple associated items are never used
   --> src/sop.rs:134:12
    |
132 | impl Sop {
    | -------- associated items in this implementation
133 |     /// Return the constant zero Sop
134 |     pub fn zero() -> Sop {
    |            ^^^^
...
139 |     pub fn one() -> Sop {
    |            ^^^
...
151 |     pub fn is_one(&self) -> bool {
    |            ^^^^^^
...
159 |     fn simplify(&mut self) {
    |        ^^^^^^^^
...
166 |     fn not(&self) -> Sop {
    |        ^^^
...
171 |     fn or(a: &Sop, b: &Sop) -> Sop {
    |        ^^
...
178 |     fn and(a: &Sop, b: &Sop) -> Sop {
    |        ^^^
    |
    = note: `#[warn(dead_code)]` on by default

Check warning on line 118 in src/sop.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy Output

variable `i` is assigned to, but never used

warning: variable `i` is assigned to, but never used
   --> src/sop.rs:118:17
    |
118 |         let mut i = 0;
    |                 ^
    |
    = note: consider using `_i` instead
    = note: `#[warn(unused_variables)]` on by default