-
Notifications
You must be signed in to change notification settings - Fork 16
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
refactor: Flatten autoendpoint server module #182
Conversation
64c6f5f
to
14abb92
Compare
ce9a7ce
to
b444dc2
Compare
use crate::server::extractors::notification_headers::NotificationHeaders; | ||
use crate::server::extractors::subscription::Subscription; | ||
use crate::extractors::notification_headers::NotificationHeaders; | ||
use crate::extractors::subscription::Subscription; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
optional, could probably collapse these:
use crate::extractors::{
notification_headers:::NotificationHeaders,
subscription::Subscription,
};
if you do, just need to be consistent with other, similar includes. Could save a bit of typing for any future moves like this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can make rustfmt handle this automatically:
https://rust-lang.github.io/rustfmt/?version=master&search=#merge_imports
Unfortunately this currently requires nightly, until rustfmt 2.0 is released. The reason is that it is an unstable style feature because it has the potential to break code.
Alternatively, do we really want this? I agree it's more consistent and saves typing, but I've also seen the argument that it is more prone to merge conflicts.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, it's the clippy battle. I think clippy really wanted folks to collapse when possible, probably because of tons of one line use
s.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, is Clippy complaining about this? I don't see any relevant lints in https://rust-lang.github.io/rust-clippy/stable/index.html
b444dc2
to
4b294f9
Compare
This PR will likely require some merge conflict resolution and rebasing, but I wanted to get it out so we fix this structure issue sooner rather than later.
Closes #157