Skip to content

Commit

Permalink
Merge pull request #441 from ltratt/clippy_fixes
Browse files Browse the repository at this point in the history
Clippy fixes.
  • Loading branch information
ratmice authored Mar 5, 2024
2 parents c81212e + 33dae79 commit b5abf08
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion cfgrammar/src/lib/idxnewtype.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

use std::mem::size_of;

use num_traits::{self, PrimInt, Unsigned};
use num_traits::{PrimInt, Unsigned};
#[cfg(feature = "serde")]
use serde::{Deserialize, Serialize};

Expand Down
2 changes: 1 addition & 1 deletion cfgrammar/src/lib/yacc/grammar.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#![allow(clippy::derive_partial_eq_without_eq)]
use std::{cell::RefCell, collections::HashMap, fmt::Write};

use num_traits::{self, AsPrimitive, PrimInt, Unsigned};
use num_traits::{AsPrimitive, PrimInt, Unsigned};
#[cfg(feature = "serde")]
use serde::{Deserialize, Serialize};
use vob::Vob;
Expand Down
1 change: 0 additions & 1 deletion lrlex/src/lib/ctbuilder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ use std::{
any::type_name,
borrow::Cow,
collections::{HashMap, HashSet},
convert::AsRef,
env::{current_dir, var},
error::Error,
fmt::{Debug, Display, Write as _},
Expand Down
4 changes: 2 additions & 2 deletions lrlex/src/lib/lexer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use std::{

use cfgrammar::{NewlineCache, Span};
use num_traits::{AsPrimitive, PrimInt, Unsigned};
use regex::{self, Regex, RegexBuilder};
use regex::{Regex, RegexBuilder};

use lrpar::{Lexeme, Lexer, LexerTypes, NonStreamingLexer};

Expand Down Expand Up @@ -448,7 +448,7 @@ where
LRNonStreamingLexer::new(s, lexemes, NewlineCache::from_str(s).unwrap())
}

fn state_matches(state: &StartState, rule_states: &Vec<usize>) -> bool {
fn state_matches(state: &StartState, rule_states: &[usize]) -> bool {
if rule_states.is_empty() {
!state.exclusive
} else {
Expand Down
2 changes: 1 addition & 1 deletion lrpar/examples/calc_actions/build.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#![deny(rust_2018_idioms)]
use cfgrammar::yacc::YaccKind;
use lrlex::{self, CTLexerBuilder};
use lrlex::CTLexerBuilder;

fn main() {
// Since we're using both lrlex and lrpar, we use lrlex's `lrpar_config` convenience function
Expand Down
1 change: 0 additions & 1 deletion lrpar/src/lib/ctbuilder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ use std::{
any::type_name,
borrow::Cow,
collections::{HashMap, HashSet},
convert::AsRef,
env::{current_dir, var},
error::Error,
fmt::{self, Debug, Write as fmtWrite},
Expand Down

0 comments on commit b5abf08

Please sign in to comment.