Skip to content

feat: generate enum default as newtype (#233) #639

feat: generate enum default as newtype (#233)

feat: generate enum default as newtype (#233) #639

GitHub Actions / clippy succeeded Mar 28, 2024 in 2s

clippy

89 warnings

Details

Results

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

Versions

  • rustc 1.79.0-nightly (c9f8f3438 2024-03-27)
  • cargo 1.79.0-nightly (499a61ce7 2024-03-26)
  • clippy 0.1.79 (c9f8f34 2024-03-27)

Annotations

Check warning on line 424 in pilota-build/src/parser/protobuf/mod.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/parser/protobuf/mod.rs:424:17
    |
424 |                 self.cur_package = f.package.clone();
    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `clone_from()`: `self.cur_package.clone_from(&f.package)`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assigning_clones

Check warning on line 178 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:178:13
    |
178 |             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 1 in pilota/src/thrift/binary_unsafe.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the item `TryInto` is imported redundantly

warning: the item `TryInto` is imported redundantly
 --> pilota/src/thrift/binary_unsafe.rs:1:11
  |
1 | use std::{convert::TryInto, ptr, slice, str};
  |           ^^^^^^^^^^^^^^^^
 --> /rustc/c9f8f3438a8134a413aa5d4903e0196e44e37bbc/library/std/src/prelude/mod.rs:148:13
  |
  = note: the item `TryInto` is already defined here

Check warning on line 1 in pilota/src/thrift/binary_le.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the item `TryInto` is imported redundantly

warning: the item `TryInto` is imported redundantly
 --> pilota/src/thrift/binary_le.rs:1:11
  |
1 | use std::{convert::TryInto, str};
  |           ^^^^^^^^^^^^^^^^
 --> /rustc/c9f8f3438a8134a413aa5d4903e0196e44e37bbc/library/std/src/prelude/mod.rs:148:13
  |
  = note: the item `TryInto` is already defined here

Check warning on line 1 in pilota/src/thrift/binary.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the item `TryInto` is imported redundantly

warning: the item `TryInto` is imported redundantly
 --> pilota/src/thrift/binary.rs:1:11
  |
1 | use std::{convert::TryInto, str};
  |           ^^^^^^^^^^^^^^^^
 --> /rustc/c9f8f3438a8134a413aa5d4903e0196e44e37bbc/library/std/src/prelude/mod.rs:148:13
  |
  = note: the item `TryInto` is already defined here

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

See this annotation in the file changed.

@github-actions github-actions / clippy

the item `Vec` is imported redundantly

warning: the item `Vec` is imported redundantly
 --> pilota/src/prost/types.rs:9:29
  |
9 | use alloc::{string::String, vec::Vec};
  |                             ^^^^^^^^
 --> /rustc/c9f8f3438a8134a413aa5d4903e0196e44e37bbc/library/std/src/prelude/mod.rs:144:13
  |
  = note: the item `Vec` is already defined here

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

See this annotation in the file changed.

@github-actions github-actions / clippy

the item `String` is imported redundantly

warning: the item `String` is imported redundantly
 --> pilota/src/prost/types.rs:9:13
  |
9 | use alloc::{string::String, vec::Vec};
  |             ^^^^^^^^^^^^^^
 --> /rustc/c9f8f3438a8134a413aa5d4903e0196e44e37bbc/library/std/src/prelude/mod.rs:144:13
  |
  = note: the item `String` is already defined here

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

See this annotation in the file changed.

@github-actions github-actions / clippy

the item `Vec` is imported redundantly

warning: the item `Vec` is imported redundantly
 --> pilota/src/prost/message.rs:3:25
  |
3 | use alloc::{boxed::Box, vec::Vec};
  |                         ^^^^^^^^
 --> /rustc/c9f8f3438a8134a413aa5d4903e0196e44e37bbc/library/std/src/prelude/mod.rs:144:13
  |
  = note: the item `Vec` is already defined here

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

See this annotation in the file changed.

@github-actions github-actions / clippy

the item `Box` is imported redundantly

warning: the item `Box` is imported redundantly
 --> pilota/src/prost/message.rs:3:13
  |
3 | use alloc::{boxed::Box, vec::Vec};
  |             ^^^^^^^^^^
 --> /rustc/c9f8f3438a8134a413aa5d4903e0196e44e37bbc/library/std/src/prelude/mod.rs:144:13
  |
  = note: the item `Box` is already defined here

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

See this annotation in the file changed.

@github-actions github-actions / clippy

the item `Vec` is imported redundantly

warning: the item `Vec` is imported redundantly
 --> pilota/src/prost/error.rs:4:38
  |
4 | use alloc::{borrow::Cow, boxed::Box, vec::Vec};
  |                                      ^^^^^^^^
 --> /rustc/c9f8f3438a8134a413aa5d4903e0196e44e37bbc/library/std/src/prelude/mod.rs:144:13
  |
  = note: the item `Vec` is already defined here

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

See this annotation in the file changed.

@github-actions github-actions / clippy

the item `Box` is imported redundantly

warning: the item `Box` is imported redundantly
 --> pilota/src/prost/error.rs:4:26
  |
4 | use alloc::{borrow::Cow, boxed::Box, vec::Vec};
  |                          ^^^^^^^^^^
 --> /rustc/c9f8f3438a8134a413aa5d4903e0196e44e37bbc/library/std/src/prelude/mod.rs:144:13
  |
  = note: the item `Box` is already defined here
  |
  = note: `#[warn(unused_imports)]` on by default

Check warning on line 5 in pilota-thrift-parser/src/parser/typedef.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the item `IResult` is imported redundantly

warning: the item `IResult` is imported redundantly
  --> pilota-thrift-parser/src/parser/typedef.rs:5:5
   |
5  |     IResult,
   |     ^^^^^^^
...
10 |     parser::*,
   |     --------- the item `IResult` is already imported here

Check warning on line 4 in pilota-thrift-parser/src/parser/typedef.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the item `tuple` is imported redundantly

warning: the item `tuple` is imported redundantly
  --> pilota-thrift-parser/src/parser/typedef.rs:4:5
   |
4  |     sequence::tuple,
   |     ^^^^^^^^^^^^^^^
...
10 |     parser::*,
   |     --------- the item `tuple` is already imported here

Check warning on line 3 in pilota-thrift-parser/src/parser/typedef.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the item `opt` is imported redundantly

warning: the item `opt` is imported redundantly
  --> pilota-thrift-parser/src/parser/typedef.rs:3:23
   |
3  |     combinator::{map, opt},
   |                       ^^^
...
10 |     parser::*,
   |     --------- the item `opt` is already imported here

Check warning on line 3 in pilota-thrift-parser/src/parser/typedef.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the item `map` is imported redundantly

warning: the item `map` is imported redundantly
  --> pilota-thrift-parser/src/parser/typedef.rs:3:18
   |
3  |     combinator::{map, opt},
   |                  ^^^
...
10 |     parser::*,
   |     --------- the item `map` is already imported here

Check warning on line 2 in pilota-thrift-parser/src/parser/typedef.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the item `tag` is imported redundantly

warning: the item `tag` is imported redundantly
  --> pilota-thrift-parser/src/parser/typedef.rs:2:5
   |
2  |     bytes::complete::tag,
   |     ^^^^^^^^^^^^^^^^^^^^
...
10 |     parser::*,
   |     --------- the item `tag` is already imported here

Check warning on line 12 in pilota-thrift-parser/src/parser/ty.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the item `Path` is imported redundantly

warning: the item `Path` is imported redundantly
  --> pilota-thrift-parser/src/parser/ty.rs:12:49
   |
12 |     descriptor::{Annotations, CppType, Literal, Path, Ty, Type},
   |                                                 ^^^^
13 |     parser::*,
   |     --------- the item `Path` is already imported here

Check warning on line 8 in pilota-thrift-parser/src/parser/ty.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the item `IResult` is imported redundantly

warning: the item `IResult` is imported redundantly
  --> pilota-thrift-parser/src/parser/ty.rs:8:5
   |
8  |     IResult,
   |     ^^^^^^^
...
13 |     parser::*,
   |     --------- the item `IResult` is already imported here

Check warning on line 7 in pilota-thrift-parser/src/parser/ty.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the item `tuple` is imported redundantly

warning: the item `tuple` is imported redundantly
  --> pilota-thrift-parser/src/parser/ty.rs:7:26
   |
7  |     sequence::{preceded, tuple},
   |                          ^^^^^
...
13 |     parser::*,
   |     --------- the item `tuple` is already imported here

Check warning on line 7 in pilota-thrift-parser/src/parser/ty.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the item `preceded` is imported redundantly

warning: the item `preceded` is imported redundantly
  --> pilota-thrift-parser/src/parser/ty.rs:7:16
   |
7  |     sequence::{preceded, tuple},
   |                ^^^^^^^^
...
13 |     parser::*,
   |     --------- the item `preceded` is already imported here

Check warning on line 6 in pilota-thrift-parser/src/parser/ty.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the item `opt` is imported redundantly

warning: the item `opt` is imported redundantly
  --> pilota-thrift-parser/src/parser/ty.rs:6:23
   |
6  |     combinator::{map, opt},
   |                       ^^^
...
13 |     parser::*,
   |     --------- the item `opt` is already imported here

Check warning on line 6 in pilota-thrift-parser/src/parser/ty.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the item `map` is imported redundantly

warning: the item `map` is imported redundantly
  --> pilota-thrift-parser/src/parser/ty.rs:6:18
   |
6  |     combinator::{map, opt},
   |                  ^^^
...
13 |     parser::*,
   |     --------- the item `map` is already imported here

Check warning on line 5 in pilota-thrift-parser/src/parser/ty.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the item `tag` is imported redundantly

warning: the item `tag` is imported redundantly
  --> pilota-thrift-parser/src/parser/ty.rs:5:5
   |
5  |     bytes::complete::tag,
   |     ^^^^^^^^^^^^^^^^^^^^
...
13 |     parser::*,
   |     --------- the item `tag` is already imported here