1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-08-16 21:07:49 +00:00

clippy: fix unneeded 'return' statement

This commit is contained in:
Sylvestre Ledru 2024-11-28 19:17:20 +01:00
parent cfb0b95b62
commit 4d3902426a

View file

@ -114,10 +114,9 @@ impl<'a> StringParser<'a> {
} }
pub fn peek_chunk(&self) -> Option<Chunk<'a>> { pub fn peek_chunk(&self) -> Option<Chunk<'a>> {
return self self.get_chunk_with_length_at(self.pointer)
.get_chunk_with_length_at(self.pointer)
.ok() .ok()
.map(|(chunk, _)| chunk); .map(|(chunk, _)| chunk)
} }
pub fn consume_chunk(&mut self) -> Result<Chunk<'a>, Error> { pub fn consume_chunk(&mut self) -> Result<Chunk<'a>, Error> {