Skip to content

Commit

Permalink
Make BufferBelt::alloc_bytes safe
Browse files Browse the repository at this point in the history
  • Loading branch information
kvark committed May 29, 2024
1 parent 2d6563f commit bdaf8c5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion blade-util/src/belt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ impl BufferBelt {
}

/// Allocate a region to hold the byte `data` slice contents.
pub unsafe fn alloc_bytes(&mut self, data: &[u8], gpu: &gpu::Context) -> gpu::BufferPiece {
pub fn alloc_bytes(&mut self, data: &[u8], gpu: &gpu::Context) -> gpu::BufferPiece {
assert!(!data.is_empty());
let bp = self.alloc(data.len() as u64, gpu);
unsafe {
Expand Down

0 comments on commit bdaf8c5

Please sign in to comment.