Skip to content

chore(deps): bump the dependencies group with 2 updates (#30) #97

chore(deps): bump the dependencies group with 2 updates (#30)

chore(deps): bump the dependencies group with 2 updates (#30) #97

GitHub Actions / clippy succeeded Jan 6, 2025 in 1s

clippy

13 warnings

Details

Results

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

Versions

  • rustc 1.83.0 (90b35a623 2024-11-26)
  • cargo 1.83.0 (5ffbef321 2024-10-29)
  • clippy 0.1.83 (90b35a6 2024-11-26)

Annotations

Check warning on line 69 in src/slr/core.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the following explicit lifetimes could be elided: 'grammar

warning: the following explicit lifetimes could be elided: 'grammar
  --> src/slr/core.rs:69:6
   |
69 | impl<'grammar> Display for SLRTable<'grammar> {
   |      ^^^^^^^^                       ^^^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
   |
69 - impl<'grammar> Display for SLRTable<'grammar> {
69 + impl Display for SLRTable<'_> {
   |

Check warning on line 57 in src/slr/core.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

you seem to use `.enumerate()` and immediately discard the index

warning: you seem to use `.enumerate()` and immediately discard the index
  --> src/slr/core.rs:57:27
   |
57 |         self.table.iter().enumerate().for_each(|(_, table)| {
   |                           ^^^^^^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_enumerate_index
   = note: `#[warn(clippy::unused_enumerate_index)]` on by default
help: remove the `.enumerate()` call
   |
57 -         self.table.iter().enumerate().for_each(|(_, table)| {
57 +         self.table.iter().for_each(|table| {
   |

Check warning on line 40 in src/slr/core.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the following explicit lifetimes could be elided: 'grammar

warning: the following explicit lifetimes could be elided: 'grammar
  --> src/slr/core.rs:40:6
   |
40 | impl<'grammar> SLRTable<'grammar> {
   |      ^^^^^^^^           ^^^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
   |
40 - impl<'grammar> SLRTable<'grammar> {
40 + impl SLRTable<'_> {
   |

Check warning on line 27 in src/slr/core.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

direct implementation of `ToString`

warning: direct implementation of `ToString`
  --> src/slr/core.rs:18:1
   |
18 | / impl ToString for SLRInstruction {
19 | |     fn to_string(&self) -> String {
20 | |         match self {
21 | |             SLRInstruction::Reduce(i) => format!("r{}", i),
...  |
26 | |     }
27 | | }
   | |_^
   |
   = help: prefer implementing `Display` instead
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_trait_impl
   = note: `#[warn(clippy::to_string_trait_impl)]` on by default

Check warning on line 172 in src/lr0/core.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

you should consider adding a `Default` implementation for `LR0ItemSet<'grammar>`

warning: you should consider adding a `Default` implementation for `LR0ItemSet<'grammar>`
   --> src/lr0/core.rs:168:5
    |
168 | /     pub fn new() -> Self {
169 | |         Self {
170 | |             items: HashSet::new(),
171 | |         }
172 | |     }
    | |_____^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default
    = note: `#[warn(clippy::new_without_default)]` on by default
help: try adding this
    |
167 + impl<'grammar> Default for LR0ItemSet<'grammar> {
168 +     fn default() -> Self {
169 +         Self::new()
170 +     }
171 + }
    |

Check warning on line 135 in src/lr0/core.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the following explicit lifetimes could be elided: 'grammar

warning: the following explicit lifetimes could be elided: 'grammar
   --> src/lr0/core.rs:135:6
    |
135 | impl<'grammar> Display for LR0ItemSet<'grammar> {
    |      ^^^^^^^^                         ^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
    |
135 - impl<'grammar> Display for LR0ItemSet<'grammar> {
135 + impl Display for LR0ItemSet<'_> {
    |

Check warning on line 119 in src/lr0/core.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the following explicit lifetimes could be elided: 'grammar

warning: the following explicit lifetimes could be elided: 'grammar
   --> src/lr0/core.rs:119:6
    |
119 | impl<'grammar> Display for LR0Item<'grammar> {
    |      ^^^^^^^^                      ^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
    = note: `#[warn(clippy::needless_lifetimes)]` on by default
help: elide the lifetimes
    |
119 - impl<'grammar> Display for LR0Item<'grammar> {
119 + impl Display for LR0Item<'_> {
    |

Check warning on line 100 in src/lr0/core.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this lifetime isn't used in the function definition

warning: this lifetime isn't used in the function definition
   --> src/lr0/core.rs:100:23
    |
100 |     pub fn transition<'a>(&self, from: usize, via: &Term) -> Option<usize> {
    |                       ^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes
    = note: `#[warn(clippy::extra_unused_lifetimes)]` on by default

Check warning on line 96 in src/lr0/core.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

struct `LR0Closure` has a public `len` method, but no `is_empty` method

warning: struct `LR0Closure` has a public `len` method, but no `is_empty` method
  --> src/lr0/core.rs:96:5
   |
96 |     pub fn len(&self) -> usize {
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_without_is_empty
   = note: `#[warn(clippy::len_without_is_empty)]` on by default

Check warning on line 51 in src/lr0/core.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

you are using an explicit closure for copying elements

warning: you are using an explicit closure for copying elements
  --> src/lr0/core.rs:51:20
   |
51 |             .chain(self.transitions.values().map(|i| *i))
   |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling the dedicated `copied` method: `self.transitions.values().copied()`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone
   = note: `#[warn(clippy::map_clone)]` on by default

Check warning on line 43 in src/utils/table.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

associated items `new`, `get`, and `set` are never used

warning: associated items `new`, `get`, and `set` are never used
  --> src/utils/table.rs:43:8
   |
42 | impl<Row: Eq + Hash, Col: Eq + Hash, V> Table<Row, Col, V> {
   | ---------------------------------------------------------- associated items in this implementation
43 |     fn new() -> Self {
   |        ^^^
...
49 |     fn get(&self, row: &Row, col: &Col) -> Option<&V> {
   |        ^^^
...
53 |     fn set(&mut self, row: Row, col: Col, v: V) {
   |        ^^^

Check warning on line 39 in src/utils/table.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

field `map` is never read

warning: field `map` is never read
  --> src/utils/table.rs:39:5
   |
38 | pub struct Table<Row: Eq + Hash, Col: Eq + Hash, V> {
   |            ----- field in this struct
39 |     map: HashMap<(Row, Col), V>,
   |     ^^^
   |
   = note: `#[warn(dead_code)]` on by default

Check warning on line 22 in src/lr0/builder.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

elided lifetime has a name

warning: elided lifetime has a name
  --> src/lr0/builder.rs:22:67
   |
13 | impl<'grammar> LR0Builder<'grammar> {
   |      -------- lifetime `'grammar` declared here
...
22 |     pub fn build(mut self, augmentation: &'grammar Production) -> LR0Closure {
   |                                                                   ^^^^^^^^^^ this elided lifetime gets resolved as `'grammar`
   |
   = note: `#[warn(elided_named_lifetimes)]` on by default