Skip to content

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

Closed
wants to merge 1 commit into from

Conversation

Florian-Schoenherr
Copy link

a lot, but small changes, see review below for some discussion

Signed-off-by: Florian-Schoenherr <[email protected]>
Copy link
Author

@Florian-Schoenherr Florian-Schoenherr left a 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 {
Copy link
Author

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 {
Copy link
Author

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> {
Copy link
Author

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

@bors-servo
Copy link
Contributor

☔ The latest upstream changes (presumably #457) made this pull request unmergeable. Please resolve the merge conflicts.

@Florian-Schoenherr
Copy link
Author

yeah whatever I can't get rustfmt to run

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

Successfully merging this pull request may close these issues.

2 participants