Skip to content

Commit e794f85

Browse files
authored
Fix clippy (#793)
1 parent e6bce83 commit e794f85

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

aws-lc-rs/src/aead/quic.rs

+2-4
Original file line numberDiff line numberDiff line change
@@ -160,10 +160,8 @@ fn cipher_new_mask(
160160
.try_into()
161161
.map_err(|_| error::Unspecified)?;
162162
let input = block::Block::zero();
163-
unsafe {
164-
let counter = core::mem::transmute::<[u8; 4], u32>(*counter_bytes).to_le();
165-
encrypt_block_chacha20(raw_key, input, nonce, counter)?
166-
}
163+
let counter = u32::from_ne_bytes(*counter_bytes).to_le();
164+
encrypt_block_chacha20(raw_key, input, nonce, counter)?
167165
}
168166
};
169167

0 commit comments

Comments
 (0)