1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-08-15 20:37:48 +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>> {
return self
.get_chunk_with_length_at(self.pointer)
self.get_chunk_with_length_at(self.pointer)
.ok()
.map(|(chunk, _)| chunk);
.map(|(chunk, _)| chunk)
}
pub fn consume_chunk(&mut self) -> Result<Chunk<'a>, Error> {