diff options
| author | Zuhaitz Méndez Fernández de Aránguiz <zuhaitz@debian> | 2026-01-31 15:31:41 +0000 |
|---|---|---|
| committer | Zuhaitz Méndez Fernández de Aránguiz <zuhaitz@debian> | 2026-01-31 15:31:41 +0000 |
| commit | ccc53b11a0e273f46cb40e5f0eb32a74ab6750bf (patch) | |
| tree | 8a4422c1d74dc4dcd951daf4555511b26b0a2e3b /std/slice.zc | |
| parent | 051400c70a4d5384923113cfbcbc69e8e58d27a0 (diff) | |
Fix for #159
Diffstat (limited to 'std/slice.zc')
| -rw-r--r-- | std/slice.zc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/std/slice.zc b/std/slice.zc index 7ace396..3c317ca 100644 --- a/std/slice.zc +++ b/std/slice.zc @@ -32,6 +32,11 @@ impl Slice<T> { return Slice<T> { data: arr, len: len }; } + // Alias for backwards compatibility with std/mem.zc + fn new(data: T*, len: usize) -> Slice<T> { + return Slice<T> { data: data, len: len }; + } + fn iterator(self) -> SliceIter<T> { return SliceIter<T> { data: self.data, |
