Skip to content

Commit

Permalink
Undo adjustments that happened because of the revert
Browse files Browse the repository at this point in the history
  • Loading branch information
Loirooriol committed Apr 8, 2024
1 parent 5e10d0f commit 2786b58
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 16 deletions.
12 changes: 0 additions & 12 deletions servo_arc/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -880,18 +880,6 @@ impl<H, T> Arc<HeaderSlice<H, T>> {
pub type ThinArc<H, T> = Arc<HeaderSlice<H, T>>;

impl<H, T> UniqueArc<HeaderSlice<H, T>> {
/// Returns the dynamically sized slice in this HeaderSlice.
#[inline(always)]
pub fn slice(&self) -> &[T] {
&self.slice
}

/// Returns the len of the slice.
#[inline(always)]
pub fn len(&self) -> usize {
self.slice.len()
}

#[inline]
pub fn from_header_and_iter<I>(header: H, items: I) -> Self
where
Expand Down
6 changes: 3 additions & 3 deletions style/properties_and_values/value.rs
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ impl ToComputedValue for SpecifiedValueComponentList {
.slice()
.iter()
.map(|item| item.to_computed_value(context));
ComputedValueComponentList::new(self.0.header.header, iter)
ComputedValueComponentList::new(self.0.header, iter)
}

fn from_computed_value(computed: &Self::ComputedValue) -> Self {
Expand All @@ -258,7 +258,7 @@ impl ToComputedValue for SpecifiedValueComponentList {
.slice()
.iter()
.map(SpecifiedValueComponent::from_computed_value);
Self::new(computed.0.header.header, iter)
Self::new(computed.0.header, iter)
}
}

Expand All @@ -274,7 +274,7 @@ impl ToCss for SpecifiedValueComponentList {
first.to_css(dest)?;

// The separator implied by the multiplier for this list.
let separator = match self.0.header.header {
let separator = match self.0.header {
// <https://drafts.csswg.org/cssom-1/#serialize-a-whitespace-separated-list>
Multiplier::Space => " ",
// <https://drafts.csswg.org/cssom-1/#serialize-a-comma-separated-list>
Expand Down
5 changes: 4 additions & 1 deletion style/values/computed/font.rs
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,10 @@ impl FontFamily {
GenericFontFamily::MozEmoji => &*MOZ_EMOJI,
GenericFontFamily::SystemUi => &*SYSTEM_UI,
};
debug_assert_eq!(*family.families.iter().next().unwrap(), SingleFontFamily::Generic(generic));
debug_assert_eq!(
*family.families.iter().next().unwrap(),
SingleFontFamily::Generic(generic)
);
family
}
}
Expand Down

0 comments on commit 2786b58

Please sign in to comment.