Skip to content

Releases: manokara/bencode-rs

v0.9.1

31 Dec 22:15
4f7ca7c
Compare
Choose a tag to compare

Changed

  • Implement Display for UpdateError
  • Expose UpdateError in the crate root

v0.9.0

31 Dec 18:29
da047f8
Compare
Choose a tag to compare

Added

  • Value::insert and Value::remove methods
  • Value::has to check if a dictionary has a key
  • "." selector as an alias for the root value in Value::select.

v0.8.1

12 Nov 23:35
9ded868
Compare
Choose a tag to compare

Changed

  • json: Fixed valid strings being considered bytes
  • parser: Throw syntax error if there are trailing data

v0.8.0

11 Nov 17:55
7c88d7e
Compare
Choose a tag to compare

Added

  • Make ValueAccessor public so it can show in the docs
  • Add load_prim() function
  • Add conversions from stdlib types to Values
  • Allow comparing primitive Values to stdlib types
  • Add Value::encode() function
  • Add a test for Value::traverse()
  • Add README
  • JSON serialization with nanoserde
  • Allow Value references to be compared to owned integer
  • Comparing Values with byte slices and vecs
  • Benchmarks
  • Stream wrapper
  • Recursion limit if the stream has no known size

Changed

  • Split library into different modules
  • Use byte slices in load_str() functions
  • Change the concept of "context" in traverse() and select()
  • The value argument of the Value::traverse closure is now optional.
  • Now load() handles both Readable types and slices.

v0.7.0

12 Nov 23:35
2067e41
Compare
Choose a tag to compare

Added

  • Missing documentation
  • Add load_dict and load_list functions
  • Add Value::get() and Value::get_mut()
  • Add Value::select_mut()

Changed

  • Rename Error to ParserError
  • Move LocalValue out of load()
  • Make Value::traverse() use get()
  • Refactor Value::select() to not use traverse() anymore

Removed

  • Unnecessary variants in Error

v0.6.0: Squashed commits from bencedit

12 Nov 23:36
2ae33a1
Compare
Choose a tag to compare

Added

  • Load bencode files
  • Display Values
  • Value::select() method
  • Customizable ValueDisplay
  • Show bytes left in repr_bytes()
  • Bencode samples
  • Value::traverse() method
  • Value::len() method

Changed

  • Limit stack depth in ValueDisplay
  • Fixed empty dicts causing syntax errors
  • Decrease stack count when popping containers in ValueDisplay
  • Truncate long lists in ValueDisplay
  • Dict iterators do not need to be peekable in ValueDisplay
  • Use a builder pattern to change parameters in ValueDisplay
  • Use container stacks with last/last_mut() instead of indexing
  • Make dict keys Strings
  • Make Value::select() and ValueDisplay::fmt() use Value::traverse()
  • Fixed list remainder in ValueDisplay being off by 10. Turns out I was using the iterator to get the number of items.

Removed

  • Ref variants from Value
  • Debug prints