aboutsummaryrefslogtreecommitdiff
path: root/std/io.zig
diff options
context:
space:
mode:
authorAndrew Kelley <superjoe30@gmail.com>2018-09-13 16:34:33 -0400
committerAndrew Kelley <superjoe30@gmail.com>2018-09-13 16:34:33 -0400
commitc06a61e9bf93810174255474598cfeae785cfbd6 (patch)
tree27d8f4262d8cd8c72c75e348e63e6c7d6a6ec0d4 /std/io.zig
parent7c3636aaa38e8efa77b73ba94362802517ea739e (diff)
downloadzig-c06a61e9bf93810174255474598cfeae785cfbd6.tar.gz
zig-c06a61e9bf93810174255474598cfeae785cfbd6.zip
remove `this`. add `@This()`.
closes #1283
Diffstat (limited to 'std/io.zig')
-rw-r--r--std/io.zig12
1 files changed, 6 insertions, 6 deletions
diff --git a/std/io.zig b/std/io.zig
index 2b31bc0548..c10fdcbbe2 100644
--- a/std/io.zig
+++ b/std/io.zig
@@ -76,7 +76,7 @@ pub const FileOutStream = struct {
pub fn InStream(comptime ReadError: type) type {
return struct {
- const Self = this;
+ const Self = @This();
pub const Error = ReadError;
/// Return the number of bytes read. If the number read is smaller than buf.len, it
@@ -218,7 +218,7 @@ pub fn InStream(comptime ReadError: type) type {
pub fn OutStream(comptime WriteError: type) type {
return struct {
- const Self = this;
+ const Self = @This();
pub const Error = WriteError;
writeFn: fn (self: *Self, bytes: []const u8) Error!void,
@@ -291,7 +291,7 @@ pub fn BufferedInStream(comptime Error: type) type {
pub fn BufferedInStreamCustom(comptime buffer_size: usize, comptime Error: type) type {
return struct {
- const Self = this;
+ const Self = @This();
const Stream = InStream(Error);
pub stream: Stream,
@@ -361,7 +361,7 @@ pub fn BufferedInStreamCustom(comptime buffer_size: usize, comptime Error: type)
/// This makes look-ahead style parsing much easier.
pub fn PeekStream(comptime buffer_size: usize, comptime InStreamError: type) type {
return struct {
- const Self = this;
+ const Self = @This();
pub const Error = InStreamError;
pub const Stream = InStream(Error);
@@ -424,7 +424,7 @@ pub fn PeekStream(comptime buffer_size: usize, comptime InStreamError: type) typ
}
pub const SliceInStream = struct {
- const Self = this;
+ const Self = @This();
pub const Error = error{};
pub const Stream = InStream(Error);
@@ -505,7 +505,7 @@ pub fn BufferedOutStream(comptime Error: type) type {
pub fn BufferedOutStreamCustom(comptime buffer_size: usize, comptime OutStreamError: type) type {
return struct {
- const Self = this;
+ const Self = @This();
pub const Stream = OutStream(Error);
pub const Error = OutStreamError;