Closed reeFridge closed 6 years ago
@reeFridge Ah interesting, thanks for catching that!
If you want to push a PR, I could accept that, or I can push this when I get some time.
@GGist ok, i'll create an PR with fixes for all affected setters.
@GGist, PR #144
case 0:
print_by_kind source run it and see nothing.
case 1:
output is the same.
I spent some time to understand why this is happening and here are the results of my digging:
src/builder/mod.rs
type of dict_access is BDictAccess<Cow<'a, [u8]>, V>
bip_bencode/src/access/dict.rs
Quote from BTreeMap docs:
now return to the our code of set_comment method:
some tests on BTreeMap:
But anyway current code in setters of MetainfoBuilder incorrectly working with result of insert method.
Fix it: patch for set_comments