refactor!: clippy and idiomatic Rust compliance#62
Conversation
roderickvd
commented
Aug 20, 2025
- Add clippy and Rust idiom lint attributes
- Refactor code for clippy::pedantic and idiomatic style
- Replace unwrap() with infallible constructors where possible
- Improve error handling and documentation
- Use assert! instead of panic! for invariants
- Prefer From over Into for conversions
- Update examples and tests for new API
- Remove unused imports and code
- Add Default implementation for Responder
- Add clippy and Rust idiom lint attributes - Refactor code for clippy::pedantic and idiomatic style - Replace unwrap() with infallible constructors where possible - Improve error handling and documentation - Use assert! instead of panic! for invariants - Prefer From over Into for conversions - Update examples and tests for new API - Remove unused imports and code - Add Default implementation for Responder
|
Thanks for picking up some of this lib. I have certainly been putting it off a bit. I generally have avoided too much formatting and lint fixing within dns_parser under the idea that we'd be able to track some updates from upstream. But that seems to just not be practical (#56 showed me how far they've diverged). Anyway this generally LGTM. If you're fixing the code according to some static analysis tool though I'd request we run that tool in the CI. |
|
Not sure what toml formatter you're using (tried taplo which used 2 spaces not 4 https://github.com/eclipse-zenoh/zenoh/pull/2057/files ) - it'd be nice to get that aligned too. Anyway merging as is. |
No problem, glad to see you around. Though I got write access here from
Thanks! This is with all clippy lints, including the pedantic ones. We can enable that in
I'm using Zed's toml extension. |
|
This of course caused the open PRs to have merge conflicts. I can help you resolve them, if you'd like. |
|
You're welcome to write to the repo if you like. I'll make a I have started rebasing/merging on #64 will take a closer look at the others next |
|
Yanked and re-released as |