Skip to content

Commit

Permalink
clean
Browse files Browse the repository at this point in the history
  • Loading branch information
josecelano committed Oct 8, 2024
1 parent f505891 commit 9205fab
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 63 deletions.
60 changes: 0 additions & 60 deletions NOTAS.txt

This file was deleted.

1 change: 1 addition & 0 deletions project-words.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ elee
fdfc
fffe
fffefdfc
fooe
fooi
llee
llleee
Expand Down
3 changes: 0 additions & 3 deletions src/parsers/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@ pub enum Error {
#[error("Unexpected end of list or dict. No matching start for the list or dict end")]
NoMatchingStartForListOrDictEnd,

#[error("Unexpected end of list. Premature end of list")]
PrematureEndOfList,

#[error("Unexpected end of dictionary. Premature end of dictionary")]
PrematureEndOfDict,
}
Expand Down
9 changes: 9 additions & 0 deletions src/parsers/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -578,6 +578,15 @@ mod tests {
assert!(result.is_err());
}

#[test]
fn fail_when_when_it_receives_a_premature_end_dict_byte() {
let dict_with_missing_key_value = b"d3:fooe";

let result = parse(dict_with_missing_key_value);

assert!(result.is_err());
}

mod with_one_key {
use crate::parsers::tests::to_json;

Expand Down
Binary file not shown.

0 comments on commit 9205fab

Please sign in to comment.