Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

impl Reader<Reader<File>> #285

Open
Murtaught opened this issue Jul 10, 2022 · 0 comments
Open

impl Reader<Reader<File>> #285

Murtaught opened this issue Jul 10, 2022 · 0 comments

Comments

@Murtaught
Copy link

Hello Andrew!

First of all, thank you for this library and all other awesome work that you do!
I was browsing through sources of this crate to get a better understanding of how everything works and found something odd in reader.rs:789.

impl Reader<Reader<File>> {

I've spent quite some time trying to understand the intent here, but luckily we have Cargo so I ended up cloning the project and experimenting with it. It turns out that the project will build and test pass if we remove inner Reader or replace it with any other type.

This silliness also works:

impl Reader<Reader<Reader<Reader<File>>>> {
impl Reader<Vec<File>> {

So I'm assuming that this is just a typo that curiously slipped through the type checker.

I think it should be fixed to be just impl Reader<File> { ... to not scare Rust newbies like myself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant