From b3c0c8b6734aad9e6743abbcfea839e5cc8d692b Mon Sep 17 00:00:00 2001 From: Jose Celano Date: Wed, 25 Sep 2024 20:53:42 +0100 Subject: [PATCH] docs: update fn doc --- src/parsers/mod.rs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/parsers/mod.rs b/src/parsers/mod.rs index f5757fb..7284fc5 100644 --- a/src/parsers/mod.rs +++ b/src/parsers/mod.rs @@ -27,16 +27,18 @@ impl BencodeParser { } } - /// todo + /// It parses a bencoded value read from input and writes the corresponding + /// JSON value to the output. /// /// # Errors /// - /// + /// Will return an error if it can't read from the input or write to the + /// output. /// /// # Panics /// - /// Will panic if ... - #[allow(clippy::single_match)] + /// Will panic if receives a byte that isn't a valid begin or end of a + /// bencoded type: integer, string, list or dictionary. pub fn parse(&mut self) -> io::Result<()> { loop { let byte = match self.byte_reader.read_byte() {