1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-08-30 08:38:16 +02:00

clippy warnings

This commit is contained in:
Nikolay Kim
2018-04-29 09:09:08 -07:00
parent d98d723f97
commit c72d1381a6
62 changed files with 1742 additions and 818 deletions

View File

@@ -1,8 +1,9 @@
#![cfg_attr(feature = "cargo-clippy", allow(cast_ptr_alignment))]
use byteorder::{BigEndian, ByteOrder, NetworkEndian};
use bytes::{BufMut, Bytes, BytesMut};
use futures::{Async, Poll, Stream};
use rand;
use std::{fmt, mem, ptr};
use std::{fmt, ptr};
use body::Binary;
use error::PayloadError;
@@ -122,7 +123,9 @@ impl Frame {
None
};
Ok(Async::Ready(Some((idx, finished, opcode, length, mask))))
Ok(Async::Ready(Some((
idx, finished, opcode, length, mask,
))))
}
fn read_chunk_md(
@@ -257,10 +260,9 @@ impl Frame {
// unmask
if let Some(mask) = mask {
#[allow(mutable_transmutes)]
let p: &mut [u8] = unsafe {
let ptr: &[u8] = &data;
mem::transmute(ptr)
&mut *(ptr as *const _ as *mut _)
};
apply_mask(p, mask);
}