Skip to content

Commit

Permalink
clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
A1-Triard committed Sep 8, 2024
1 parent 1e867d3 commit 69032d5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
edition = "2021"
name = "utf8-chars"
version = "3.0.3"
version = "3.0.4"
rust-version = "1.70"
authors = ["warlock <internalmike@gmail.com>"]
description = "Char-by-char iterator and `read_char` method for `BufRead`."
Expand Down
4 changes: 4 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ use std::io::{self, BufRead};
use arrayvec::{ArrayVec};

/// A structure, containing read bytes, and an [`io::Error`].
///
/// The `io::Error` is an actual I/O error if some occurred,
/// or a synthetic error with either the [`UnexpectedEof`](std::io::ErrorKind::UnexpectedEof)
/// kind if a multi-byte char was unexpectedly terminated,
Expand Down Expand Up @@ -64,6 +65,7 @@ impl fmt::Display for ReadCharError {
}

/// An iterator over the chars of an instance of [`BufRead`].
///
/// In contrast to [`CharsRaw`], the error type is
/// [`io::Error`], and therefore more likely to be drop-in
/// compatible, at the price of losing the UTF-8 context bytes in the error
Expand Down Expand Up @@ -120,6 +122,7 @@ fn read_byte_and_ignore_interrupts(reader: &mut (impl BufRead + ?Sized)) -> io::
/// Extends [`BufRead`] with methods for reading chars.
pub trait BufReadCharsExt : BufRead {
/// Returns an iterator over the chars of this reader.
///
/// In contrast to [`chars_raw`](BufReadCharsExt::chars_raw), the error type is
/// [`io::Error`], and therefore more likely to be drop-in
/// compatible, at the price of losing the UTF-8 context bytes in the error
Expand All @@ -136,6 +139,7 @@ pub trait BufReadCharsExt : BufRead {
fn chars_raw(&mut self) -> CharsRaw<Self> { CharsRaw(self) }

/// Reads a char from the underlying reader.
///
/// In contrast to [`read_char_raw`](BufReadCharsExt::read_char_raw), the error type is
/// [`io::Error`], and therefore more likely to be drop-in
/// compatible, at the price of losing the UTF-8 context bytes in the error
Expand Down

0 comments on commit 69032d5

Please sign in to comment.