From 0ae09aac32234ec85d115507e6544db4a785bece Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Sun, 13 Aug 2017 16:49:05 +0200 Subject: [PATCH] style: Remove a few unneeded transmutes. --- components/style/stylesheets/origin.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/components/style/stylesheets/origin.rs b/components/style/stylesheets/origin.rs index 7ca3e21fcbe..1d2bbadd09d 100644 --- a/components/style/stylesheets/origin.rs +++ b/components/style/stylesheets/origin.rs @@ -5,7 +5,6 @@ ///! [CSS cascade origins](https://drafts.csswg.org/css-cascade/#cascading-origins). use std::marker::PhantomData; -use std::mem::transmute; /// Each style rule has an origin, which determines where it enters the cascade. /// @@ -135,9 +134,9 @@ impl<'a, T> Iterator for PerOriginIterMut<'a, T> where T: 'a { fn next(&mut self) -> Option { let result = match self.cur { - 0 => (unsafe { transmute(&mut (*self.data).author) }, Origin::Author), - 1 => (unsafe { transmute(&mut (*self.data).user) }, Origin::User), - 2 => (unsafe { transmute(&mut (*self.data).user_agent) }, Origin::UserAgent), + 0 => (unsafe { &mut (*self.data).author }, Origin::Author), + 1 => (unsafe { &mut (*self.data).user }, Origin::User), + 2 => (unsafe { &mut (*self.data).user_agent }, Origin::UserAgent), _ => return None, }; self.cur += 1;