diff --git a/src/lib.rs b/src/lib.rs index 76dd0b4..e228289 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -177,7 +177,7 @@ impl<'a> VertexStream<'a> { /// Create a new `VertexStream` from a slice of typed vertices. /// Its stride and size are calculated based on the size `T` of the slice elements. - pub fn new_from_slice(data: &[T]) -> VertexStream<'a> { + pub fn new_from_slice(data: &'a [T]) -> VertexStream<'a> { let stride = size_of::(); let size = stride; let data = typed_to_bytes(data);