diff options
author | Bert Belder <bertbelder@gmail.com> | 2019-04-17 15:25:51 +0200 |
---|---|---|
committer | Bert Belder <bertbelder@gmail.com> | 2019-04-17 15:35:46 +0200 |
commit | 8477daa8b970ae8ef042a5242aee705003b63fc1 (patch) | |
tree | 61fb35d8b367749c35df82f399c176edc7773464 /core/examples/http_bench.rs | |
parent | 90c2b10f47ab123f0ea7d71f3eeb3ee9172f7000 (diff) |
Fix clippy warnings
Diffstat (limited to 'core/examples/http_bench.rs')
-rw-r--r-- | core/examples/http_bench.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/core/examples/http_bench.rs b/core/examples/http_bench.rs index e4598a7b3..7cacf79b0 100644 --- a/core/examples/http_bench.rs +++ b/core/examples/http_bench.rs @@ -61,6 +61,7 @@ impl Into<Buf> for Record { impl From<&[u8]> for Record { fn from(s: &[u8]) -> Record { + #[allow(clippy::cast_ptr_alignment)] let ptr = s.as_ptr() as *const i32; let ints = unsafe { std::slice::from_raw_parts(ptr, 4) }; Record { @@ -75,7 +76,7 @@ impl From<&[u8]> for Record { impl From<Buf> for Record { fn from(buf: Buf) -> Record { assert_eq!(buf.len(), 4 * 4); - //let byte_len = buf.len(); + #[allow(clippy::cast_ptr_alignment)] let ptr = Box::into_raw(buf) as *mut [i32; 4]; let ints: Box<[i32]> = unsafe { Box::from_raw(ptr) }; assert_eq!(ints.len(), 4); |