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

Remove unnecessary imports #134

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Conversation

nicoburns
Copy link
Collaborator

@nicoburns nicoburns commented Mar 10, 2025

  1. Import is unnecessary as the same type is imported at the top of the file.
  2. In general, you don't need to import Debug derive macro

These imports do not exist upstream so this helps to reduce the diff.

Signed-off-by: Nico Burns <nico@nicoburns.com>
Signed-off-by: Nico Burns <nico@nicoburns.com>
@nicoburns nicoburns changed the title Remove unnecessary import Remove unnecessary imports Mar 10, 2025
Signed-off-by: Nico Burns <nico@nicoburns.com>
Comment on lines 1232 to -1234
#[cfg(feature = "gecko")]
#[inline]
#[cfg(feature = "gecko")]
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: duplicate attribute.

@@ -1949,7 +1949,6 @@ impl ComputedValues {

/// Get the initial computed values.
pub fn initial_values_with_font_override(default_font: super::style_structs::Font) -> Arc<Self> {
use crate::logical_geometry::WritingMode;
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Already imported at top of file

@@ -15,7 +15,7 @@ use crate::values::specified::{AllowQuirks, Integer, NonNegativeNumberOrPercenta
use crate::values::CustomIdent;
use cssparser::Parser;
use num_traits::FromPrimitive;
use std::fmt::{self, Debug, Write};
use std::fmt::{self, Write};
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is not necessary to import std::fmt::Debug just to use the derive macro.

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.

1 participant