Move buffered_input
to an input
module.
This commit is contained in:
parent
65fcb6fde3
commit
0e9cee18f2
3 changed files with 7 additions and 2 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
pub mod buffered;
|
||||||
|
|
||||||
|
#[allow(clippy::module_name_repetitions)]
|
||||||
|
pub use buffered::BufferedInput;
|
||||||
|
|
||||||
use crate::char_traits::is_blank_or_breakz;
|
use crate::char_traits::is_blank_or_breakz;
|
||||||
|
|
||||||
/// Interface for a source of characters.
|
/// Interface for a source of characters.
|
||||||
|
|
|
@ -21,6 +21,7 @@ const BUFFER_LEN: usize = 16;
|
||||||
/// characters at a time and sometimes pushing some back into the stream.
|
/// characters at a time and sometimes pushing some back into the stream.
|
||||||
/// There is no "easy" way of doing this without itertools. In order to avoid pulling the entierty
|
/// There is no "easy" way of doing this without itertools. In order to avoid pulling the entierty
|
||||||
/// of itertools for one method, we use this structure.
|
/// of itertools for one method, we use this structure.
|
||||||
|
#[allow(clippy::module_name_repetitions)]
|
||||||
pub struct BufferedInput<T: Iterator<Item = char>> {
|
pub struct BufferedInput<T: Iterator<Item = char>> {
|
||||||
/// The iterator source,
|
/// The iterator source,
|
||||||
input: T,
|
input: T,
|
|
@ -32,7 +32,6 @@
|
||||||
|
|
||||||
#![warn(missing_docs, clippy::pedantic)]
|
#![warn(missing_docs, clippy::pedantic)]
|
||||||
|
|
||||||
mod buffered_input;
|
|
||||||
mod char_traits;
|
mod char_traits;
|
||||||
#[macro_use]
|
#[macro_use]
|
||||||
mod debug;
|
mod debug;
|
||||||
|
@ -40,6 +39,6 @@ mod input;
|
||||||
mod parser;
|
mod parser;
|
||||||
mod scanner;
|
mod scanner;
|
||||||
|
|
||||||
pub use crate::buffered_input::BufferedInput;
|
pub use crate::input::BufferedInput;
|
||||||
pub use crate::parser::{Event, EventReceiver, MarkedEventReceiver, Parser, Tag};
|
pub use crate::parser::{Event, EventReceiver, MarkedEventReceiver, Parser, Tag};
|
||||||
pub use crate::scanner::{Marker, ScanError, TScalarStyle};
|
pub use crate::scanner::{Marker, ScanError, TScalarStyle};
|
||||||
|
|
Loading…
Reference in a new issue