Skip to content

Commit

Permalink
style: build / rebase fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
emilio committed Jun 18, 2020
1 parent 56283a3 commit 7a696cb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 2 additions & 0 deletions components/style/shared_lock.rs
Expand Up @@ -258,6 +258,8 @@ impl<T> Locked<T> {
#[cfg(feature = "gecko")]
impl<T: ToShmem> ToShmem for Locked<T> {
fn to_shmem(&self, builder: &mut SharedMemoryBuilder) -> to_shmem::Result<Self> {
use std::mem::ManuallyDrop;

let guard = self.shared_lock.read();
Ok(ManuallyDrop::new(Locked {
shared_lock: SharedRwLock::read_only(),
Expand Down
7 changes: 5 additions & 2 deletions components/style/values/specified/font.rs
Expand Up @@ -498,10 +498,12 @@ impl ToComputedValue for FontStretch {
ToCss,
ToResolvedValue,
ToShmem,
Serialize,
Deserialize,
)]
#[cfg_attr(feature = "servo", derive(Serialize, Deserialize))]
#[allow(missing_docs)]
pub enum KeywordSize {
#[repr(u8)]
pub enum FontSizeKeyword {
#[css(keyword = "xx-small")]
XXSmall,
XSmall,
Expand Down Expand Up @@ -794,6 +796,7 @@ impl FontSizeKeyword {
FontSizeKeyword::XLarge => medium * 3.0 / 2.0,
FontSizeKeyword::XXLarge => medium * 2.0,
FontSizeKeyword::XXXLarge => medium * 3.0,
FontSizeKeyword::None => unreachable!(),
})
}

Expand Down

0 comments on commit 7a696cb

Please sign in to comment.