Skip to content

Commit

Permalink
style: cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
7sDream committed Dec 5, 2024
1 parent 7185cad commit 5f52450
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/one_char.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,7 @@ impl OneChar {
pub fn from_utf8_bytes(s: &str) -> Result<Self, ParseError> {
let mut digits = s.chars();

let bytes = std::iter::from_fn(|| {
Some((digits.next(), digits.next()))
})
let bytes = std::iter::from_fn(|| Some((digits.next(), digits.next())))
.take_while(|(c1, _)| c1.is_some())
.map(|(c1, c2)| -> Result<u8, ParseError> {
let c1 = c1.expect("at least one char because of the take_while");
Expand Down

0 comments on commit 5f52450

Please sign in to comment.