Skip to content

Commit

Permalink
Update hashbrown requirement from 0.14.3 to 0.15.0 (#148)
Browse files Browse the repository at this point in the history
* Update hashbrown requirement from 0.14.3 to 0.15.0

Updates the requirements on [hashbrown](https://github.com/rust-lang/hashbrown) to permit the latest version.
- [Changelog](https://github.com/rust-lang/hashbrown/blob/master/CHANGELOG.md)
- [Commits](rust-lang/hashbrown@v0.14.3...v0.15.0)

---
updated-dependencies:
- dependency-name: hashbrown
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>

* fix new lint warnings

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jeff Crocker <[email protected]>
  • Loading branch information
dependabot[bot] and CrockAgile authored Oct 6, 2024
1 parent dec7d35 commit c89fcbe
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ use_debug = "deny"
tracing = { version = "0.1.37", optional = true }
tracing-subscriber = { version = "0.3.16", optional = true, features = ["env-filter"] }
tracing-flame = { version = "0.2.0", optional = true }
hashbrown = "0.14.3"
hashbrown = "0.15.0"

[dependencies.rand]
version = "0.8.0"
Expand Down
2 changes: 1 addition & 1 deletion src/earley/traversal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ pub(crate) enum TermMatch<'gram> {
#[derive(Debug)]
pub(crate) struct Traversal<'gram> {
pub id: TraversalId,
/// The unmatched "right hand side" [`Term]s
/// The unmatched "right hand side" [`Term`]s
pub unmatched: &'gram [crate::Term],
/// The input text available for parsing
pub input_range: InputRange<'gram>,
Expand Down
7 changes: 5 additions & 2 deletions src/grammar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ pub struct ParseTree<'gram> {
}

impl<'gram> ParseTree<'gram> {
pub(crate) fn new(lhs: &'gram Term, rhs: Vec<ParseTreeNode<'gram>>) -> Self {
pub(crate) const fn new(lhs: &'gram Term, rhs: Vec<ParseTreeNode<'gram>>) -> Self {
Self { lhs, rhs }
}
}
Expand Down Expand Up @@ -247,7 +247,10 @@ impl Grammar {
}

/// Parse input strings according to `Grammar`
pub fn parse_input<'gram>(&'gram self, input: &'gram str) -> impl Iterator<Item = ParseTree> {
pub fn parse_input<'gram>(
&'gram self,
input: &'gram str,
) -> impl Iterator<Item = ParseTree<'gram>> {
crate::earley::parse(self, input)
}

Expand Down
4 changes: 2 additions & 2 deletions src/production.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ pub struct Production {
impl Production {
/// Construct a new `Production`
#[must_use]
pub fn new() -> Production {
pub const fn new() -> Production {
Production {
lhs: Term::Nonterminal(String::new()),
rhs: vec![],
Expand All @@ -29,7 +29,7 @@ impl Production {

/// Construct an `Production` from `Expression`s
#[must_use]
pub fn from_parts(t: Term, e: Vec<Expression>) -> Production {
pub const fn from_parts(t: Term, e: Vec<Expression>) -> Production {
Production { lhs: t, rhs: e }
}

Expand Down

0 comments on commit c89fcbe

Please sign in to comment.