change slicing syntax from ... to ..

See #359
This commit is contained in:
Andrew Kelley
2017-05-19 10:39:59 -04:00
parent b483db4868
commit 051ee8e626
40 changed files with 164 additions and 158 deletions

View File

@@ -149,8 +149,8 @@ fn printLineFromFile(allocator: &mem.Allocator, out_stream: &io.OutStream, line_
var column: usize = 1;
var abs_index: usize = 0;
while (true) {
const amt_read = %return f.read(buf[0...]);
const slice = buf[0...amt_read];
const amt_read = %return f.read(buf[0..]);
const slice = buf[0..amt_read];
for (slice) |byte| {
if (line == line_info.line) {
@@ -939,7 +939,7 @@ var some_mem: [100 * 1024]u8 = undefined;
var some_mem_index: usize = 0;
fn globalAlloc(self: &mem.Allocator, n: usize) -> %[]u8 {
const result = some_mem[some_mem_index ... some_mem_index + n];
const result = some_mem[some_mem_index .. some_mem_index + n];
some_mem_index += n;
return result;
}