Skip to content

Commit

Permalink
default impl for Parser (#51)
Browse files Browse the repository at this point in the history
  • Loading branch information
zahash authored and vldm committed Feb 26, 2024
1 parent 54c5baf commit a225580
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/parser/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,14 @@ pub struct Parser<C> {
config: ParserConfig<C>,
}

impl Default for Parser<Infallible> {
fn default() -> Self {
Self {
config: ParserConfig::default(),
}
}
}

impl<C: CustomNode + std::fmt::Debug> Parser<C> {
/// Create a new parser with the given [`ParserConfig`].
pub fn new(config: ParserConfig<C>) -> Self {
Expand Down

0 comments on commit a225580

Please sign in to comment.