impl Debug for StagingBelt (#2572)

This commit is contained in:
Kevin Reid
2022-04-02 09:06:51 -07:00
committed by GitHub
parent 84fadca870
commit fab11dcc76

View File

@@ -2,6 +2,7 @@ use crate::{
Buffer, BufferAddress, BufferDescriptor, BufferSize, BufferUsages, BufferViewMut,
CommandEncoder, Device, MapMode,
};
use std::fmt;
use std::pin::Pin;
use std::task::{self, Poll};
use std::{future::Future, sync::mpsc};
@@ -182,3 +183,14 @@ impl StagingBelt {
Join { futures }
}
}
impl fmt::Debug for StagingBelt {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.debug_struct("StagingBelt")
.field("chunk_size", &self.chunk_size)
.field("active_chunks", &self.active_chunks.len())
.field("closed_chunks", &self.closed_chunks.len())
.field("free_chunks", &self.free_chunks.len())
.finish_non_exhaustive()
}
}