Skip to content

Commit

Permalink
cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
attackgoat committed Dec 16, 2023
1 parent b4c2198 commit dfc7f9c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
3 changes: 1 addition & 2 deletions examples/skeletal-anim/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -385,8 +385,7 @@ impl Model {

assert!(indices.index_count() < u16::MAX as usize);

let indices = indices
.as_u16().unwrap();
let indices = indices.as_u16().unwrap();
let index_data = cast_slice(&indices);
let vertex_data = part.vertex_data();

Expand Down
10 changes: 8 additions & 2 deletions src/driver/buffer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,10 @@ impl Buffer {
/// # Ok(()) }
/// ```
pub fn mapped_slice(this: &Self) -> &[u8] {
debug_assert!(this.info.can_map, "Buffer is not mappable - create using can_map flag");
debug_assert!(
this.info.can_map,
"Buffer is not mappable - create using can_map flag"
);

&this.allocation.as_ref().unwrap().mapped_slice().unwrap()[0..this.info.size as usize]
}
Expand Down Expand Up @@ -367,7 +370,10 @@ impl Buffer {
/// # Ok(()) }
/// ```
pub fn mapped_slice_mut(this: &mut Self) -> &mut [u8] {
debug_assert!(this.info.can_map, "Buffer is not mappable - create using can_map flag");
debug_assert!(
this.info.can_map,
"Buffer is not mappable - create using can_map flag"
);

&mut this
.allocation
Expand Down

0 comments on commit dfc7f9c

Please sign in to comment.