Skip to content

Commit

Permalink
Fix clippy lints
Browse files Browse the repository at this point in the history
Specifically `rust-version = "1.58"` in the `autogen` module that
I added in #223 is weird, since any developers working on and/or
contributing to the repository should easily be able to run the latest
stable and take advantage of newer Rust features in `autogen` code.
  • Loading branch information
MarijnS95 committed Nov 1, 2024
1 parent 7916b0c commit 29da8b1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion autogen/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ authors = [
"Lei Zhang <[email protected]>",
]
edition = "2018"
rust-version = "1.58"

publish = false

Expand Down
4 changes: 2 additions & 2 deletions autogen/src/dr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ pub fn gen_dr_operand_kinds(grammar: &[structs::OperandKind]) -> TokenStream {
let mut seen_discriminator = BTreeMap::new();

for e in enumerators {
if seen_discriminator.get(&e.value).is_none() {
if let std::collections::btree_map::Entry::Vacant(seen_entry) = seen_discriminator.entry(e.value) {
let name = match category {
structs::Category::BitEnum => {
use heck::ShoutySnakeCase;
Expand All @@ -412,7 +412,7 @@ pub fn gen_dr_operand_kinds(grammar: &[structs::OperandKind]) -> TokenStream {
_ => panic!("Unexpected operand type"),
};

seen_discriminator.insert(e.value, name.clone());
seen_entry.insert(name.clone());

capability_clauses
.entry(&e.capabilities)
Expand Down

0 comments on commit 29da8b1

Please sign in to comment.