Change Buffer impl of BufferSlice

This commit is contained in:
Pierre Krieger 2017-04-25 08:39:58 +02:00
parent 9a114a03b7
commit 77481c1540

View File

@ -161,12 +161,17 @@ impl<T, B> BufferSlice<[T], B> {
}
}
unsafe impl<T: ?Sized, B> Buffer for BufferSlice<T, B> where B: BufferAccess {
type Access = Self;
unsafe impl<T: ?Sized, B> Buffer for BufferSlice<T, B> where B: Buffer {
type Access = BufferSlice<T, B::Access>;
#[inline]
fn access(self) -> Self {
self
fn access(self) -> Self::Access {
BufferSlice {
marker: PhantomData,
resource: self.resource.access(),
offset: self.offset,
size: self.size,
}
}
#[inline]