Skip to content

fix: generate auto derive attributes correctly (#240) #622

fix: generate auto derive attributes correctly (#240)

fix: generate auto derive attributes correctly (#240) #622

GitHub Actions / clippy succeeded Apr 22, 2024 in 0s

clippy

7 warnings

Details

Results

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

Versions

  • rustc 1.79.0-nightly (fb898629a 2024-04-21)
  • cargo 1.79.0-nightly (80d5b607d 2024-04-19)
  • clippy 0.1.79 (fb89862 2024-04-21)

Annotations

Check warning on line 176 in pilota-build/src/middle/context.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

assigning the result of `Clone::clone()` may be inefficient

warning: assigning the result of `Clone::clone()` may be inefficient
   --> pilota-build/src/middle/context.rs:176:13
    |
176 |             self.location_map = location_map.clone();
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `clone_from()`: `self.location_map.clone_from(&location_map)`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assigning_clones
    = note: `#[warn(clippy::assigning_clones)]` on by default

Check warning on line 60 in pilota-build/src/ir/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

struct `ExceptionVariant` is never constructed

warning: struct `ExceptionVariant` is never constructed
  --> pilota-build/src/ir/mod.rs:60:12
   |
60 | pub struct ExceptionVariant {
   |            ^^^^^^^^^^^^^^^^
   |
   = note: `ExceptionVariant` has derived impls for the traits `Debug` and `Clone`, but these are intentionally ignored during dead code analysis

Check warning on line 14 in pilota-build/src/index.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

method `increment_by` is never used

warning: method `increment_by` is never used
  --> pilota-build/src/index.rs:14:8
   |
3  | pub trait Idx: Sized + Copy + 'static {
   |           --- method in this trait
...
14 |     fn increment_by(&mut self, amount: usize) {
   |        ^^^^^^^^^^^^
   |
   = note: `#[warn(dead_code)]` on by default

Check warning on line 67 in pilota/src/prost/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

usage of a legacy numeric method

warning: usage of a legacy numeric method
  --> pilota/src/prost/mod.rs:67:24
   |
67 |     if length > usize::max_value() as u64 {
   |                        ^^^^^^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
help: use the associated constant instead
   |
67 |     if length > usize::MAX as u64 {
   |                        ~~~

Check warning on line 9 in pilota/src/prost/encoding.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

importing legacy numeric constants

warning: importing legacy numeric constants
 --> pilota/src/prost/encoding.rs:9:55
  |
9 | use core::{cmp::min, convert::TryFrom, mem, str, u32, usize};
  |                                                       ^^^^^
  |
  = help: remove this import
  = note: then `usize::<CONST>` will resolve to the respective associated constant
  = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants

Check warning on line 9 in pilota/src/prost/encoding.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

importing legacy numeric constants

warning: importing legacy numeric constants
 --> pilota/src/prost/encoding.rs:9:50
  |
9 | use core::{cmp::min, convert::TryFrom, mem, str, u32, usize};
  |                                                  ^^^
  |
  = help: remove this import
  = note: then `u32::<CONST>` will resolve to the respective associated constant
  = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants

Check warning on line 4 in pilota/src/prost/message.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

importing legacy numeric constants

warning: importing legacy numeric constants
 --> pilota/src/prost/message.rs:4:24
  |
4 | use core::{fmt::Debug, usize};
  |                        ^^^^^
  |
  = help: remove this import
  = note: then `usize::<CONST>` will resolve to the respective associated constant
  = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
  = note: `#[warn(clippy::legacy_numeric_constants)]` on by default