Skip to content

Name conflict between 2 ByteString's #15

@dtantsur

Description

@dtantsur

There are 2 things in this library called ByteString: enum item ByteString and type util::ByteString used as a key. Placing in util:: mod looks like it's something auxiliary while actually it's necessary part of the core functionality (I can hardly imagine implementing To/FromBencode without using it explicitly). I am working around this like:

use bencode;
use bencode::util::ByteString;
...

Now I have ByteString and bencode::ByteString, both from bencode package. Guess which one is which :) Judging by use case, the could should be Key (why you didn't use it as initally wanted?) or smth like BytesHelper.

Could you rename one of ByteString's and move the second one to the top level of your package?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions