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

Unused imports in generated code #139

Open
rooooooooob opened this issue Feb 8, 2023 · 3 comments
Open

Unused imports in generated code #139

rooooooooob opened this issue Feb 8, 2023 · 3 comments

Comments

@rooooooooob
Copy link
Collaborator

We blindly import various things in some places for simplicity's sake in the code generation.

Some have been fixed in #137 but others remain:

[] prelude::* in lib.rs
[] crate::cbor_encodings::* in serialize.rs
[] super::* in serialize.rs
[] super::* in cbor_encodings.rs
[] OrderedHashMap / BTreeMap in every struct file, regardless of if needed

@rooooooooob
Copy link
Collaborator Author

The remaining ones are probably lower priority as most are just an issue of removing a single line from files after generation.

@SebastienGllmt
Copy link
Collaborator

This isn't that bad I think. Probably we can use something like rustfmt to just delete unused imports after the codegen runs

@gostkin
Copy link
Contributor

gostkin commented Feb 8, 2023

we can run cargo clippy --fix as well so there're less warnings

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

3 participants