Skip to content

Commit

Permalink
Appeased clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
zesterer committed Feb 29, 2024
1 parent d93e12a commit b03bcf8
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 10 deletions.
1 change: 1 addition & 0 deletions README2.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ you may need. It also has `no_std` support, making it suitable for embedded envi
- 🏷️ **Pattern labelling** for dynamic, user-friendly error messages
- 🗃️ **Caching** allows parsers to be created once and reused many times
- ↔️ **Pratt parsing** support for unary and binary operators
- 🪛 **no_std** support, allowing chumsky to run in embedded environments

*Note: Error diagnostic rendering is performed by [Ariadne](https://github.com/zesterer/ariadne)*

Expand Down
1 change: 1 addition & 0 deletions benches/json.rs
Original file line number Diff line number Diff line change
Expand Up @@ -468,6 +468,7 @@ mod pest {

use pest::{error::Error, Parser};

#[allow(clippy::empty_docs)] // TODO: Remove, pest does things clippy doesn't like for some reason
#[derive(pest_derive::Parser)]
#[grammar = "benches/json.pest"]
struct JsonParser;
Expand Down
1 change: 1 addition & 0 deletions src/combinator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1427,6 +1427,7 @@ where
A: Parser<'a, I, OA, E>,
{
#[inline(always)]
#[allow(clippy::nonminimal_bool)] // TODO: Remove this, lint is currently buggy
fn go<M: Mode>(&self, inp: &mut InputRef<'a, '_, I, E>) -> PResult<M, ()> {
if self.at_most == !0 && self.at_least == 0 {
loop {
Expand Down
1 change: 1 addition & 0 deletions src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
//! like [`Cheap`], [`Simple`] or [`Rich`].

use super::*;
#[cfg(not(feature = "std"))]
use alloc::string::ToString;

/// A trait that describes parser error types.
Expand Down
7 changes: 1 addition & 6 deletions src/input.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,8 @@
pub use crate::stream::{BoxedExactSizeStream, BoxedStream, Stream};

use super::*;
#[cfg(feature = "memoization")]
use hashbrown::HashMap;
#[cfg(feature = "std")]
use std::{
cell::RefCell,
io::{BufReader, Read, Seek},
};
use std::io::{BufReader, Read, Seek};

/// A trait for types that represents a stream of input tokens. Unlike [`Iterator`], this type
/// supports backtracking and a few other features required by the crate.
Expand Down
2 changes: 0 additions & 2 deletions src/stream.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
use super::*;

use core::cell::Cell;

/// An input that dynamically pulls tokens from an [`Iterator`].
///
/// Internally, the stream will pull tokens in batches so as to avoid invoking the iterator every time a new token is
Expand Down
3 changes: 1 addition & 2 deletions src/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
use super::*;

use core::{
cmp::{Ord, PartialEq, PartialOrd},
hash::{Hash, Hasher},
hash::Hasher,
ops::{Deref, DerefMut},
};

Expand Down

0 comments on commit b03bcf8

Please sign in to comment.