Skip to content

Commit

Permalink
Fix: allow compiling with Rust 1.15
Browse files Browse the repository at this point in the history
  • Loading branch information
dhardy committed Dec 17, 2017
1 parent 3a4f9f0 commit 3eac806
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/impls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,14 @@ pub fn fill_bytes_via_u64<R: Rng+?Sized>(rng: &mut R, dest: &mut [u8]) {
}

macro_rules! impl_uint_from_fill {
($self:expr, $ty:ty, $N:expr) => ({
($rng:expr, $ty:ty, $N:expr) => ({
debug_assert!($N == size_of::<$ty>());

let mut int: $ty = 0;
unsafe {
let ptr = &mut int as *mut $ty as *mut u8;
let slice = slice::from_raw_parts_mut(ptr, $N);
$self.fill_bytes(slice);
$rng.fill_bytes(slice);
}
int
});
Expand Down

0 comments on commit 3eac806

Please sign in to comment.