Skip to content

Commit

Permalink
style: Remove unnecessary mem::transmute in MediaListKey.
Browse files Browse the repository at this point in the history
  • Loading branch information
heycam authored and emilio committed Jan 13, 2019
1 parent c04a414 commit 7efbd9c
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions components/style/invalidation/media_queries.rs
Expand Up @@ -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)
}
}

Expand Down

0 comments on commit 7efbd9c

Please sign in to comment.