Skip to content

Commit d7f0a38

Browse files
committed
refactor(pc): Removed init_context parser
1 parent 513c7f4 commit d7f0a38

3 files changed

Lines changed: 1 addition & 49 deletions

File tree

rusty_pc/src/init_context.rs

Lines changed: 0 additions & 32 deletions
This file was deleted.

rusty_pc/src/lib.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ pub mod delimited;
99
pub mod filter;
1010
pub mod filter_map;
1111
pub mod flatten;
12-
mod init_context;
1312
mod lazy;
1413
pub mod many;
1514
pub mod many_ctx;
@@ -30,7 +29,6 @@ mod token;
3029
mod top_level;
3130

3231
pub use ctx::*;
33-
pub use init_context::*;
3432
pub use lazy::*;
3533
pub use or::*;
3634
pub use parser::*;

rusty_pc/src/parser.rs

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ use crate::map_err::{
1515
use crate::or_default::OrDefaultParser;
1616
use crate::peek::PeekParser;
1717
use crate::to_option::ToOptionParser;
18-
use crate::{InitContextParser, NoContextParser, ThenWithContextParser};
18+
use crate::{NoContextParser, ThenWithContextParser};
1919

2020
/// A parser uses the given input in order to produce a result.
2121
pub trait Parser<I, C = ()>
@@ -213,20 +213,6 @@ where
213213
FlattenParser::new(self)
214214
}
215215

216-
// =======================================================================
217-
// InitContext
218-
// =======================================================================
219-
220-
/// Creates a parser that will initialize the context of the underlying parser
221-
/// to the given value before parsing starts.
222-
fn init_context(self, value: C) -> InitContextParser<Self, C>
223-
where
224-
Self: Sized,
225-
C: Clone,
226-
{
227-
InitContextParser::new(self, value)
228-
}
229-
230216
// =======================================================================
231217
// Many
232218
// =======================================================================

0 commit comments

Comments
 (0)