changeset 14126 | 69db1d2e4cec |
parent 14037 | 2869c2ccb1b8 |
child 14165 | c24a76f131d6 |
--- a/rust/vec2d/src/lib.rs Sat Nov 03 17:40:21 2018 +0100 +++ b/rust/vec2d/src/lib.rs Sat Nov 03 18:29:58 2018 +0100 @@ -55,6 +55,10 @@ Self { size, data: vec![value; size.area()] } } + pub fn raw_data(&self) -> &[T] { + &self.data + } + #[inline] pub fn get(&self, row: usize, column: usize) -> Option<&<usize as SliceIndex<[T]>>::Output> { self.data.get(row * self.width() + column)