mirror of
https://github.com/vulkano-rs/vulkano.git
synced 2024-11-25 00:04:15 +00:00
Fixed borked panic message in Buffer::from_data
/ Buffer::from_inter
(#2292)
This commit is contained in:
parent
2d391f3760
commit
ff7b4fc90e
@ -252,9 +252,7 @@ impl Buffer {
|
||||
let buffer = Buffer::new_sized(allocator, create_info, allocation_info)?;
|
||||
|
||||
{
|
||||
let mut write_guard = buffer
|
||||
.write()
|
||||
.expect("the buffer is somehow in use before we returned it to the user");
|
||||
let mut write_guard = buffer.write().unwrap();
|
||||
*write_guard = data;
|
||||
}
|
||||
|
||||
@ -293,9 +291,7 @@ impl Buffer {
|
||||
)?;
|
||||
|
||||
{
|
||||
let mut write_guard = buffer
|
||||
.write()
|
||||
.expect("the buffer is somehow in use before we returned it to the user");
|
||||
let mut write_guard = buffer.write().unwrap();
|
||||
|
||||
for (o, i) in write_guard.iter_mut().zip(iter) {
|
||||
*o = i;
|
||||
|
Loading…
Reference in New Issue
Block a user