Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Oct 14, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 6 additions & 15 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -8,9 +8,9 @@ edition = "2021"
[dependencies]
bnf = "0.5.0"
pretty_env_logger = "0.5.0"
indexmap = "2.5.0"
indexmap = "2.6.0"
insta = "1.40.0"
itertools = "0.13.0"
log = "0.4.22"
once_cell = "1.20.1"
once_cell = "1.20.2"
tabled = "0.16.0"

Unchanged files with check annotations Beta

Empty,
}
impl ToString for SLRInstruction {
fn to_string(&self) -> String {
match self {
SLRInstruction::Reduce(i) => format!("r{}", i),
SLRInstruction::Shift(i) => format!("s{}", i),
SLRInstruction::Goto(i) => format!("g{}", i),
SLRInstruction::Empty => String::new(),
}
}
}

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

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
impl From<&SLRInstruction> for String {
fn from(val: &SLRInstruction) -> Self {
builder.push_record(header.iter().map(|t| t.to_string()));
self.table.iter().enumerate().for_each(|(_, table)| {

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

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| { |
let row = header
.iter()
.map(|t| table.get(t).unwrap_or(&SLRInstruction::Empty))
self.transitions
.keys()
.map(|(i, _)| *i)
.chain(self.transitions.values().map(|i| *i))

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

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
.unique()
.sorted()
}
}
/// number of states in the closure
pub fn len(&self) -> usize {

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

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
self.closures.len()
}
pub fn transition<'a>(&self, from: usize, via: &Term) -> Option<usize> {

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

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
self.transitions.get(&(from, via)).copied()
}
}
}
impl<'grammar> LR0ItemSet<'grammar> {
pub fn new() -> Self {
Self {
items: HashSet::new(),
}
}

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

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 + } |
pub fn closure(&self, grammar: &'grammar Grammar) -> LR0ItemSet<'grammar> {
let lookup = Lookup::new(grammar);
impl<Row: Eq, Col: Eq> Eq for (dyn KeyPair<Row, Col> + '_) {}
pub struct Table<Row: Eq + Hash, Col: Eq + Hash, V> {
map: HashMap<(Row, Col), V>,

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

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
}
impl<Row: Eq + Hash, Col: Eq + Hash, V> Table<Row, Col, V> {
fn new() -> Self {

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

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) { | ^^^
Table {
map: HashMap::new(),
}