Improve flexibility of DmaStreamSlice

This commit is contained in:
Shaowei Song
2024-11-20 13:43:57 +00:00
committed by Tate, Hongliang Tian
parent 29ebfa3934
commit d37da228ab
3 changed files with 77 additions and 22 deletions

View File

@ -19,7 +19,7 @@ impl DmaBuf for DmaStream {
}
}
impl DmaBuf for DmaStreamSlice<'_> {
impl<Dma: AsRef<DmaStream>> DmaBuf for DmaStreamSlice<Dma> {
fn len(&self) -> usize {
self.nbytes()
}