mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
style: Remove unnecessary mem::transmute in MediaListKey.
Differential Revision: https://phabricator.services.mozilla.com/D16147
This commit is contained in:
parent
c04a4140a7
commit
7efbd9cde6
1 changed files with 1 additions and 3 deletions
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue