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
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion style/properties/properties.mako.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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

use crate::computed_value_flags::ComputedValueFlags;
use servo_arc::Arc;
use super::{ComputedValues, ComputedValuesInner, longhands, style_structs};
Expand Down
2 changes: 1 addition & 1 deletion style/values/specified/box.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.

use style_traits::{CssWriter, KeywordsCollectFn, ParseError};
use style_traits::{SpecifiedValueInfo, StyleParseErrorKind, ToCss};

Expand Down
1 change: 0 additions & 1 deletion style/values/specified/length.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1231,7 +1231,6 @@ impl NoCalcLength {
/// absolute or (if a font metrics getter is provided) font-relative units.
#[cfg(feature = "gecko")]
#[inline]
#[cfg(feature = "gecko")]
Comment on lines 1232 to -1234
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.

pub fn to_computed_pixel_length_with_font_metrics(
&self,
get_font_metrics: Option<impl Fn() -> GeckoFontMetrics>,
Expand Down