-
Notifications
You must be signed in to change notification settings - Fork 238
chore: rust edition 2021 and clippy #456
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
Conversation
Signed-off-by: Florian-Schoenherr <[email protected]>
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.
I also just realized a lot of changes are trailing commas and binops, although I haven't changed the rustfmt.toml
? Haven't overridden it either..
} | ||
|
||
/// A subset/refinement of `tokenizer::XToken`. Everything else is handled | ||
/// specially at the beginning of `process_token`. | ||
#[derive(PartialEq, Eq, Clone, Debug)] | ||
pub enum Token { | ||
pub enum TokenWrapper { |
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.
clippy complained, I think Wrapper makes sense, as XTokens get wrapped by it.
pub
so might need version bump
@@ -16,15 +16,15 @@ use crate::tokenizer::{Doctype, Pi, Tag}; | |||
|
|||
#[derive(PartialEq, Eq, Copy, Clone, Debug)] | |||
pub enum XmlPhase { |
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.
clippy complained, I think removing Phase makes sense.
pub
so might need version bump
@@ -105,13 +102,13 @@ impl BufferQueue { | |||
/// Get the next character if one is available, removing it from the queue. | |||
/// | |||
/// This function manages the buffers, removing them as they become empty. | |||
pub fn next(&mut self) -> Option<char> { | |||
pub fn next_char(&mut self) -> Option<char> { |
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.
clippy complained, thinks it could be confused with std::iter::Iterator::next
,
also pub
so if we need a version bump anyways, we could update this as well,
or we can revert
☔ The latest upstream changes (presumably #457) made this pull request unmergeable. Please resolve the merge conflicts. |
yeah whatever I can't get rustfmt to run |
a lot, but small changes, see review below for some discussion