Closed nagisa closed 9 years ago
It looks mostly fine to me, with the following caveats:
encoding::types::decode
is in the strange location (it was a result of aggressive module split, sigh), but we need to wait until 0.3 to get rid of it. You may want to move it into the crate root and reexport it from encoding::types
.types
tests should be actually in a new crate.I guess most (and in fact all, but I haven't tried that) types tests should be actually in a new crate.
The tests depend on encoding::util
which is a private module, therefore moving tests without rewriting them to not use index_iter
is not possible. Do you still want to move them? I’ll change tests to not use index_iter
then.
@nagisa Ah, that's a legitimate reason (and my suggestion can be incrementally implemented anyway). I have no reason not to merge this, so I went ahead; thank you for the PR!
This allows for creation of alternative non-WHATWG encodings that use the same interface as encodings defined in this crate without pulling in all the tables and encodings.
This commit does not introduce any breaking changes; all the types previously defined in encoding::types are reexported.
Fixes #81.
I tried to avoid breaking changes for now, but IMO
fn decode
being inencoding::types
makes little sense; I’d move it toencoding
at some point later.