aboutsummaryrefslogtreecommitdiff
path: root/src/reader.rs
diff options
context:
space:
mode:
authorMartin Fischer <martin@push-f.com>2023-08-11 21:28:50 +0200
committerMartin Fischer <martin@push-f.com>2023-08-19 06:41:55 +0200
commit620deab83d13d9aeca3bb894e6fc20c516c1405f (patch)
tree0d30976ac31942bc0c99413460193b3d7be95f58 /src/reader.rs
parent83144505291319395c1ba40035cf933786bf3422 (diff)
break!: remove Never in favor of std::convert::Infallible
This change is a backport of 04e6cbe[1] from html5gum. [1]: https://github.com/untitaker/html5gum/commit/04e6cbe44bb7a388bd61d1c9cfe4c618eb3b0e29
Diffstat (limited to 'src/reader.rs')
-rw-r--r--src/reader.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/reader.rs b/src/reader.rs
index 0e7a3a4..1acb4a3 100644
--- a/src/reader.rs
+++ b/src/reader.rs
@@ -1,4 +1,4 @@
-use crate::Never;
+use std::convert::Infallible;
use std::io::{self, BufRead, BufReader, Read};
/// An object that provides characters to the tokenizer.
@@ -67,7 +67,7 @@ impl<'a> StringReader<'a> {
}
impl<'a> Reader for StringReader<'a> {
- type Error = Never;
+ type Error = Infallible;
fn read_char(&mut self) -> Result<Option<char>, Self::Error> {
let c = match self.cursor.next() {