Skip to content

Commit 7efc7d5

Browse files
committed
cargo fmt fix
1 parent a19dfc4 commit 7efc7d5

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

src/quad_gl.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1015,7 +1015,12 @@ impl QuadGl {
10151015
.get_quad_pipeline_mut(pipeline)
10161016
.set_uniform(name, uniform);
10171017
}
1018-
pub fn set_uniform_array<T: ToBytes>(&mut self, pipeline: GlPipeline, name: &str, uniform: &[T]) {
1018+
pub fn set_uniform_array<T: ToBytes>(
1019+
&mut self,
1020+
pipeline: GlPipeline,
1021+
name: &str,
1022+
uniform: &[T],
1023+
) {
10191024
self.state.break_batching = true;
10201025

10211026
self.pipelines

src/tobytes.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,11 @@ impl<T: ToBytes, const N: usize> ToBytes for &[T; N] {
3535

3636
impl<T: ToBytes> ToBytes for &[T] {
3737
fn to_bytes(&self) -> &[u8] {
38-
unsafe { std::slice::from_raw_parts(self.as_ptr() as *const _ as *const u8, std::mem::size_of::<T>() * self.len()) }
38+
unsafe {
39+
std::slice::from_raw_parts(
40+
self.as_ptr() as *const _ as *const u8,
41+
std::mem::size_of::<T>() * self.len(),
42+
)
43+
}
3944
}
4045
}

0 commit comments

Comments
 (0)