Skip to content

Merge pull request #101 from rust-bio/dependabot/cargo/derive-new-0.6.0 #184

Merge pull request #101 from rust-bio/dependabot/cargo/derive-new-0.6.0

Merge pull request #101 from rust-bio/dependabot/cargo/derive-new-0.6.0 #184

GitHub Actions / clippy succeeded Jul 15, 2024 in 0s

clippy

6 warnings

Details

Results

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

Versions

  • rustc 1.79.0 (129f3b996 2024-06-10)
  • cargo 1.79.0 (ffa9cf99a 2024-06-03)
  • clippy 0.1.79 (129f3b9 2024-06-10)

Annotations

Check warning on line 296 in src/strand.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

dereferencing a tuple pattern where every element takes a reference

warning: dereferencing a tuple pattern where every element takes a reference
   --> src/strand.rs:296:36
    |
296 |             (&Option::Some(ref x), &Option::Some(ref x1)) => x.same(x1),
    |                                    ^^^^^^^^^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference
help: try removing the `&` and `ref` parts
    |
296 -             (&Option::Some(ref x), &Option::Some(ref x1)) => x.same(x1),
296 +             (&Option::Some(ref x), Option::Some(x1)) => x.same(x1),
    |

Check warning on line 296 in src/strand.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

dereferencing a tuple pattern where every element takes a reference

warning: dereferencing a tuple pattern where every element takes a reference
   --> src/strand.rs:296:14
    |
296 |             (&Option::Some(ref x), &Option::Some(ref x1)) => x.same(x1),
    |              ^^^^^^^^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference
    = note: `#[warn(clippy::needless_borrowed_reference)]` on by default
help: try removing the `&` and `ref` parts
    |
296 -             (&Option::Some(ref x), &Option::Some(ref x1)) => x.same(x1),
296 +             (Option::Some(x), &Option::Some(ref x1)) => x.same(x1),
    |

Check warning on line 65 in src/sequence.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this `impl` can be derived

warning: this `impl` can be derived
  --> src/sequence.rs:61:1
   |
61 | / impl Default for SequenceReadPairOrientation {
62 | |     fn default() -> Self {
63 | |         None
64 | |     }
65 | | }
   | |_^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls
   = help: remove the manual implementation...
help: ...and instead derive it...
   |
49 + #[derive(Default)]
50 | pub enum SequenceReadPairOrientation {
   |
help: ...and mark the default variant
   |
58 ~     #[default]
59 ~     None,
   |

Check warning on line 41 in src/genome.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

non-canonical implementation of `partial_cmp` on an `Ord` type

warning: non-canonical implementation of `partial_cmp` on an `Ord` type
  --> src/genome.rs:32:1
   |
32 | /  impl PartialOrd for Interval {
33 | |      fn partial_cmp(&self, other: &Self) -> Option<cmp::Ordering> {
   | | __________________________________________________________________-
34 | ||         Some(self.contig.cmp(&other.contig).then_with(|| {
35 | ||             self.range
36 | ||                 .start
...  ||
39 | ||         }))
40 | ||     }
   | ||_____- help: change this to: `{ Some(std::cmp::Ord::cmp(self, other)) }`
41 | |  }
   | |__^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#non_canonical_partial_ord_impl
   = note: `#[warn(clippy::non_canonical_partial_ord_impl)]` on by default

Check warning on line 70 in src/annot/refids.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this pattern creates a reference to a reference

warning: this pattern creates a reference to a reference
  --> src/annot/refids.rs:70:25
   |
70 |             if let Some(ref r) = self.refids.get(id) {
   |                         ^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
   = note: `#[warn(clippy::needless_borrow)]` on by default
help: try
   |
70 ~             if let Some(r) = self.refids.get(id) {
71 ~                 r.clone()
   |

Check warning on line 56 in src/alignment.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this `impl` can be derived

warning: this `impl` can be derived
  --> src/alignment.rs:52:1
   |
52 | / impl Default for AlignmentMode {
53 | |     fn default() -> Self {
54 | |         AlignmentMode::Global
55 | |     }
56 | | }
   | |_^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls
   = note: `#[warn(clippy::derivable_impls)]` on by default
   = help: remove the manual implementation...
help: ...and instead derive it...
   |
45 + #[derive(Default)]
46 | pub enum AlignmentMode {
   |
help: ...and mark the default variant
   |
48 ~     #[default]
49 ~     Global,
   |