diff options
author | Martin Fischer <martin@push-f.com> | 2023-08-12 11:27:14 +0200 |
---|---|---|
committer | Martin Fischer <martin@push-f.com> | 2023-08-19 06:41:55 +0200 |
commit | c3d60e88efa32329614178dfc9455ef33ea0a88d (patch) | |
tree | 6511535e8cdc680b031d56f6b1d9916e691b0bbf | |
parent | d345a368045ba898049ac643e87d1f38f77d988c (diff) |
docs: move note about Reader impls to Reader trait
-rw-r--r-- | src/reader.rs | 3 | ||||
-rw-r--r-- | src/tokenizer.rs | 3 |
2 files changed, 2 insertions, 4 deletions
diff --git a/src/reader.rs b/src/reader.rs index 1acb4a3..f756c65 100644 --- a/src/reader.rs +++ b/src/reader.rs @@ -3,7 +3,8 @@ use std::io::{self, BufRead, BufReader, Read}; /// An object that provides characters to the tokenizer. /// -/// See [`crate::Tokenizer::new`] for more information. +/// Patches are welcome for providing an efficient implementation over async streams, +/// iterators, files, etc, as long as any dependencies come behind featureflags. pub trait Reader { /// The error returned by this reader. type Error: std::error::Error; diff --git a/src/tokenizer.rs b/src/tokenizer.rs index b1dd4ba..d7db3b6 100644 --- a/src/tokenizer.rs +++ b/src/tokenizer.rs @@ -44,9 +44,6 @@ pub struct Tokenizer<R: Reader, E: Emitter<R> = DefaultEmitter<R, ()>> { impl<R: Reader> Tokenizer<R> { /// Create a new tokenizer from some input. - /// - /// Patches are welcome for providing an efficient implementation over async streams, - /// iterators, files, etc, as long as any dependencies come behind featureflags. pub fn new<'a, S: IntoReader<'a, Reader = R>>(input: S) -> Self { Tokenizer::<S::Reader>::new_with_emitter(input, DefaultEmitter::default()) } |