Skip to content

Documentation fixup #146

Documentation fixup

Documentation fixup #146

Triggered via push September 21, 2023 08:52
Status Success
Total duration 1m 39s
Billable time 6m
Artifacts

ci.yml

on: push
Matrix: test
Fit to window
Zoom out
Zoom in

Annotations

29 warnings
this returns a `Result<_, ()>`: src/parser/slr.rs#L41
warning: this returns a `Result<_, ()>` --> src/parser/slr.rs:41:5 | 41 | pub fn parse(&self, mut input: Lexer<T>) -> Result<Cst<V, T>, ()> { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: use a custom `Error` type instead = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_unit_err = note: `#[warn(clippy::result_unit_err)]` on by default
method `first` is never used: src/grammar.rs#L100
warning: method `first` is never used --> src/grammar.rs:100:8 | 95 | impl<V, T> Grammar<V, T> | ------------------------ method in this implementation ... 100 | fn first(&self, variable: V) -> HashSet<&Symbol<V, T>> { | ^^^^^
method `iter_terminals` is never used: src/grammar.rs#L49
warning: method `iter_terminals` is never used --> src/grammar.rs:49:19 | 45 | impl<V, T> Grammar<V, T> | ------------------------ method in this implementation ... 49 | pub(crate) fn iter_terminals(&self) -> impl Iterator<Item = &T> { | ^^^^^^^^^^^^^^
method `iter_variables` is never used: src/grammar.rs#L40
warning: method `iter_variables` is never used --> src/grammar.rs:40:19 | 32 | impl<V, T> Grammar<V, T> | ------------------------ method in this implementation ... 40 | pub(crate) fn iter_variables(&self) -> impl Iterator<Item = V> + '_ { | ^^^^^^^^^^^^^^
fields `symbol` and `children` are never read: src/cst.rs#L10
warning: fields `symbol` and `children` are never read --> src/cst.rs:10:16 | 9 | pub(crate) struct Node<V, T> { | ---- fields in this struct 10 | pub(crate) symbol: Symbol<V, T>, | ^^^^^^ 11 | pub(crate) children: Vec<Node<V, T>>, | ^^^^^^^^ | = note: `Node` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis
field `root` is never read: src/cst.rs#L5
warning: field `root` is never read --> src/cst.rs:5:16 | 4 | pub struct Cst<V, T> { | --- field in this struct 5 | pub(crate) root: Node<V, T>, | ^^^^ | = note: `Cst` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis
method `get_cursor_terminal` is never used: src/cfsm/item.rs#L53
warning: method `get_cursor_terminal` is never used --> src/cfsm/item.rs:53:19 | 28 | impl<V, T> ItemBody<V, T> { | ------------------------- method in this implementation ... 53 | pub(crate) fn get_cursor_terminal(&self) -> Option<&T> { | ^^^^^^^^^^^^^^^^^^^ | = note: `#[warn(dead_code)]` on by default
field `len` is never read: pango-lexer/src/main.rs#L8
warning: field `len` is never read --> pango-lexer/src/main.rs:8:9 | 8 | D { len: usize }, | - ^^^ | | | field in this variant | = note: `#[warn(dead_code)]` on by default
usage of `Iterator::fold` on a type that implements `Try`: pango-lexer/src/regex/tokenizer.rs#L377
warning: usage of `Iterator::fold` on a type that implements `Try` --> pango-lexer/src/regex/tokenizer.rs:377:14 | 377 | .fold(Some((digit_count, start)), |acc, d| { | ______________^ 378 | | acc.map(|(digit_count, n)| (digit_count + 1, (n << 4) + d)) 379 | | }) | |______________^ help: use `try_fold` instead: `try_fold((digit_count, start), |acc, d| ...)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_try_fold = note: `#[warn(clippy::manual_try_fold)]` on by default
methods `with_transition` and `get_state` are never used: pango-lexer/src/fsm/nfa/model.rs#L219
warning: methods `with_transition` and `get_state` are never used --> pango-lexer/src/fsm/nfa/model.rs:219:19 | 160 | impl NfaBuilder { | --------------- methods in this implementation ... 219 | pub(super) fn with_transition(mut self, start: StateId, end: StateId, input: Input) -> Self { | ^^^^^^^^^^^^^^^ ... 268 | pub(super) fn get_state(&self, state_id: StateId) -> &State { | ^^^^^^^^^ | = note: `#[warn(dead_code)]` on by default
unused variable: `state_counters`: pango-lexer/src/fsm/nfa/sim.rs#L184
warning: unused variable: `state_counters` --> pango-lexer/src/fsm/nfa/sim.rs:184:13 | 184 | state_counters, | ^^^^^^^^^^^^^^ help: try ignoring the field: `state_counters: _` | = note: `#[warn(unused_variables)]` on by default
unused import: `ast::Ast`: pango-lexer/src/regex/mod.rs#L1
warning: unused import: `ast::Ast` --> pango-lexer/src/regex/mod.rs:1:23 | 1 | pub(crate) use self::{ast::Ast, parser::Parser}; | ^^^^^^^^
unnecessary `pub(self)`: pango-lexer/src/fsm/nfa/mod.rs#L6
warning: unnecessary `pub(self)` --> pango-lexer/src/fsm/nfa/mod.rs:6:1 | 6 | pub(self) use super::StateId; | ^^^^^^^^^ help: remove it | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pub_self = note: `#[warn(clippy::needless_pub_self)]` on by default
unused import: `sim::NfaSimulator`: pango-lexer/src/fsm/mod.rs#L2
warning: unused import: `sim::NfaSimulator` --> pango-lexer/src/fsm/mod.rs:2:58 | 2 | nfa::{compiler::Compiler as NfaCompiler, model::Nfa, sim::NfaSimulator}, | ^^^^^^^^^^^^^^^^^ | = note: `#[warn(unused_imports)]` on by default
this returns a `Result<_, ()>`: src/parser/slr.rs#L41
warning: this returns a `Result<_, ()>` --> src/parser/slr.rs:41:5 | 41 | pub fn parse(&self, mut input: Lexer<T>) -> Result<Cst<V, T>, ()> { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: use a custom `Error` type instead = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_unit_err = note: `#[warn(clippy::result_unit_err)]` on by default
method `first` is never used: src/grammar.rs#L100
warning: method `first` is never used --> src/grammar.rs:100:8 | 95 | impl<V, T> Grammar<V, T> | ------------------------ method in this implementation ... 100 | fn first(&self, variable: V) -> HashSet<&Symbol<V, T>> { | ^^^^^
method `iter_terminals` is never used: src/grammar.rs#L49
warning: method `iter_terminals` is never used --> src/grammar.rs:49:19 | 45 | impl<V, T> Grammar<V, T> | ------------------------ method in this implementation ... 49 | pub(crate) fn iter_terminals(&self) -> impl Iterator<Item = &T> { | ^^^^^^^^^^^^^^
method `iter_variables` is never used: src/grammar.rs#L40
warning: method `iter_variables` is never used --> src/grammar.rs:40:19 | 32 | impl<V, T> Grammar<V, T> | ------------------------ method in this implementation ... 40 | pub(crate) fn iter_variables(&self) -> impl Iterator<Item = V> + '_ { | ^^^^^^^^^^^^^^
fields `symbol` and `children` are never read: src/cst.rs#L10
warning: fields `symbol` and `children` are never read --> src/cst.rs:10:16 | 9 | pub(crate) struct Node<V, T> { | ---- fields in this struct 10 | pub(crate) symbol: Symbol<V, T>, | ^^^^^^ 11 | pub(crate) children: Vec<Node<V, T>>, | ^^^^^^^^ | = note: `Node` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis
field `root` is never read: src/cst.rs#L5
warning: field `root` is never read --> src/cst.rs:5:16 | 4 | pub struct Cst<V, T> { | --- field in this struct 5 | pub(crate) root: Node<V, T>, | ^^^^ | = note: `Cst` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis
method `get_cursor_terminal` is never used: src/cfsm/item.rs#L53
warning: method `get_cursor_terminal` is never used --> src/cfsm/item.rs:53:19 | 28 | impl<V, T> ItemBody<V, T> { | ------------------------- method in this implementation ... 53 | pub(crate) fn get_cursor_terminal(&self) -> Option<&T> { | ^^^^^^^^^^^^^^^^^^^ | = note: `#[warn(dead_code)]` on by default
field `len` is never read: pango-lexer/src/main.rs#L8
warning: field `len` is never read --> pango-lexer/src/main.rs:8:9 | 8 | D { len: usize }, | - ^^^ | | | field in this variant | = note: `#[warn(dead_code)]` on by default
usage of `Iterator::fold` on a type that implements `Try`: pango-lexer/src/regex/tokenizer.rs#L377
warning: usage of `Iterator::fold` on a type that implements `Try` --> pango-lexer/src/regex/tokenizer.rs:377:14 | 377 | .fold(Some((digit_count, start)), |acc, d| { | ______________^ 378 | | acc.map(|(digit_count, n)| (digit_count + 1, (n << 4) + d)) 379 | | }) | |______________^ help: use `try_fold` instead: `try_fold((digit_count, start), |acc, d| ...)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_try_fold = note: `#[warn(clippy::manual_try_fold)]` on by default
methods `with_transition` and `get_state` are never used: pango-lexer/src/fsm/nfa/model.rs#L219
warning: methods `with_transition` and `get_state` are never used --> pango-lexer/src/fsm/nfa/model.rs:219:19 | 160 | impl NfaBuilder { | --------------- methods in this implementation ... 219 | pub(super) fn with_transition(mut self, start: StateId, end: StateId, input: Input) -> Self { | ^^^^^^^^^^^^^^^ ... 268 | pub(super) fn get_state(&self, state_id: StateId) -> &State { | ^^^^^^^^^ | = note: `#[warn(dead_code)]` on by default
unused variable: `state_counters`: pango-lexer/src/fsm/nfa/sim.rs#L184
warning: unused variable: `state_counters` --> pango-lexer/src/fsm/nfa/sim.rs:184:13 | 184 | state_counters, | ^^^^^^^^^^^^^^ help: try ignoring the field: `state_counters: _` | = note: `#[warn(unused_variables)]` on by default
unused import: `ast::Ast`: pango-lexer/src/regex/mod.rs#L1
warning: unused import: `ast::Ast` --> pango-lexer/src/regex/mod.rs:1:23 | 1 | pub(crate) use self::{ast::Ast, parser::Parser}; | ^^^^^^^^
unnecessary `pub(self)`: pango-lexer/src/fsm/nfa/mod.rs#L6
warning: unnecessary `pub(self)` --> pango-lexer/src/fsm/nfa/mod.rs:6:1 | 6 | pub(self) use super::StateId; | ^^^^^^^^^ help: remove it | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pub_self = note: `#[warn(clippy::needless_pub_self)]` on by default
unused import: `sim::NfaSimulator`: pango-lexer/src/fsm/mod.rs#L2
warning: unused import: `sim::NfaSimulator` --> pango-lexer/src/fsm/mod.rs:2:58 | 2 | nfa::{compiler::Compiler as NfaCompiler, model::Nfa, sim::NfaSimulator}, | ^^^^^^^^^^^^^^^^^ | = note: `#[warn(unused_imports)]` on by default
clippy
The following actions uses node12 which is deprecated and will be forced to run on node16: actions-rs/clippy-check@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/