Make clippy happy.

This commit is contained in:
Chris Morgan 2017-01-20 18:10:55 +05:30
parent b549457d62
commit 34028c35e7

View file

@ -7,6 +7,7 @@ use std::borrow::Borrow;
use std::collections::hash_map::{self, HashMap}; use std::collections::hash_map::{self, HashMap};
use std::hash::Hash; use std::hash::Hash;
use std::hash::{Hasher, BuildHasherDefault}; use std::hash::{Hasher, BuildHasherDefault};
#[cfg(test)]
use std::mem; use std::mem;
use std::ops::{Index, IndexMut}; use std::ops::{Index, IndexMut};
use std::ptr; use std::ptr;
@ -24,7 +25,7 @@ impl Hasher for TypeIdHasher {
// This expects to receive one and exactly one 64-bit value // This expects to receive one and exactly one 64-bit value
debug_assert!(bytes.len() == 8); debug_assert!(bytes.len() == 8);
unsafe { unsafe {
ptr::copy_nonoverlapping(mem::transmute(&bytes[0]), &mut self.value, 1) ptr::copy_nonoverlapping(&bytes[0] as *const u8 as *const u64, &mut self.value, 1)
} }
} }