Skip to content

Commit

Permalink
Rustfmt.
Browse files Browse the repository at this point in the history
  • Loading branch information
ElectronicRU committed Oct 31, 2021
1 parent 5c10df0 commit 4e79e3a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions crevice-tests/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ fn proper_offset_calculations_for_differing_member_sizes() {
fn array_strides_small_value() {
#[derive(Debug, PartialEq, AsStd140, AsStd430)]
struct ArrayOfSmallValues {
inner: [f32; 4]
inner: [f32; 4],
}

assert_std140!((size = 64, align = 16) ArrayOfSmallValues {
Expand All @@ -344,7 +344,7 @@ fn array_strides_small_value() {
fn array_strides_vec3() {
#[derive(Debug, PartialEq, AsStd140, AsStd430)]
struct ArrayOfSmallValues {
inner: [Vector3<f32>; 4]
inner: [Vector3<f32>; 4],
}

assert_std140!((size = 64, align = 16) ArrayOfSmallValues {
Expand Down
4 changes: 2 additions & 2 deletions src/std140/traits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -206,11 +206,11 @@ where
}

fn from_std140(val: Self::Output) -> Self {
let mut res: [MaybeUninit<T>; N] = unsafe{ MaybeUninit::uninit().assume_init() };
let mut res: [MaybeUninit<T>; N] = unsafe { MaybeUninit::uninit().assume_init() };
for i in 0..N {
res[i] = MaybeUninit::new(T::from_std140(Std140Convertible::into_std140(val.0[i])));
}
unsafe {core::mem::transmute_copy(&res) }
unsafe { core::mem::transmute_copy(&res) }
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/std430/traits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -206,11 +206,11 @@ where
}

fn from_std430(val: Self::Output) -> Self {
let mut res: [MaybeUninit<T>; N] = unsafe{ MaybeUninit::uninit().assume_init() };
let mut res: [MaybeUninit<T>; N] = unsafe { MaybeUninit::uninit().assume_init() };
for i in 0..N {
res[i] = MaybeUninit::new(T::from_std430(val.0[i].into_std430()));
}
unsafe {core::mem::transmute_copy(&res) }
unsafe { core::mem::transmute_copy(&res) }
}
}

Expand Down

0 comments on commit 4e79e3a

Please sign in to comment.