style: Use alias for StylePathCommand.

So we could drop transmute in svg_path related functions.

Differential Revision: https://phabricator.services.mozilla.com/D10140
This commit is contained in:
Boris Chiou 2018-10-31 06:20:32 +00:00 committed by Emilio Cobos Álvarez
parent c7027e2676
commit b81bbb85b4
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
2 changed files with 2 additions and 13 deletions

View file

@ -4947,11 +4947,7 @@ fn set_style_svg_path(
&mut shape_source.__bindgen_anon_1.mSVGPath.as_mut().mPtr.as_mut().unwrap()
};
let iter = servo_path.commands().iter().map(|command| {
// unsafe: cbindgen ensures the representation is the same.
unsafe { transmute(*command) }
});
gecko_path.mPath.assign_from_iter_pod(iter);
gecko_path.mPath.assign_from_iter_pod(servo_path.commands().iter().cloned());
// Setup fill-rule.
gecko_path.mFillRule = fill;