Fix warnings in gfx.

This commit is contained in:
Ms2ger 2015-02-13 11:00:20 +01:00
parent 5e999c7d40
commit e25322ce5b
6 changed files with 24 additions and 12 deletions

View file

@ -58,7 +58,7 @@ impl FontTableTagConversions for FontTableTag {
fn tag_to_str(&self) -> String {
unsafe {
let pointer = mem::transmute::<&u32, *const u8>(self);
let mut bytes = slice::from_raw_buf(&pointer, 4).to_vec();
let mut bytes = slice::from_raw_parts(pointer, 4).to_vec();
bytes.reverse();
String::from_utf8_unchecked(bytes)
}