Skip to content
Permalink
Browse files

style: Remove unnecessary mem::transmute in MediaListKey.

  • Loading branch information...
heycam authored and emilio committed Jan 10, 2019
1 parent c04a414 commit 7efbd9cde6d99571c559f1365c12ed07d68397c5
Showing with 1 addition and 3 deletions.
  1. +1 −3 components/style/invalidation/media_queries.rs
@@ -38,10 +38,8 @@ impl MediaListKey {
pub trait ToMediaListKey: Sized {
/// Get a `MediaListKey` for this item. This key needs to uniquely identify
/// the item.
#[allow(unsafe_code)]
fn to_media_list_key(&self) -> MediaListKey {
use std::mem;
MediaListKey(unsafe { mem::transmute(self as *const Self) })
MediaListKey(self as *const Self as usize)
}
}

0 comments on commit 7efbd9c

Please sign in to comment.
You can’t perform that action at this time.