Skip to content

Commit

Permalink
docs: add code review
Browse files Browse the repository at this point in the history
  • Loading branch information
josecelano committed Oct 7, 2024
1 parent 4830f24 commit 8f24656
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/io/writer.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
use std::io;

/* code-review:
The function `write_byte` only writes:
- Bytes used in integers:
- Digits: '0','1','2','3','4','5','6','7','8','9'
- 'e', '-'
- JSON reservers chars: '[', ',', ']', '{', ',', ':', '}' defined as constants.
It could be refactored to be more restrictive. However, in the future we also
want to print Bencoded strings as bytes streams, without trying to convert
them into UTF-8 strings.
*/

pub trait Writer {
/// It writes one byte to the output.
///
Expand Down

0 comments on commit 8f24656

Please sign in to comment.