From 656b640e79e8cd391a046bb69713bffc3e0ff7b3 Mon Sep 17 00:00:00 2001 From: Paul Date: Sat, 11 Jul 2020 09:09:43 +0700 Subject: [PATCH] Update doc/langref.html.in Co-authored-by: Joachim Schmidt --- doc/langref.html.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/langref.html.in b/doc/langref.html.in index 0f17f4c096..c84edbc6a2 100644 --- a/doc/langref.html.in +++ b/doc/langref.html.in @@ -312,7 +312,7 @@ pub fn main() !void {

In Zig, the standard output stream's print function is allowed to fail because it is actually a function defined for a generic output stream. Consider a generic output stream that - represents writing data to a file and the disk is full; a write to the file will fail. However, + represents writing data to a file. When the disk is full, a write to the file will fail. However, we typically do not expect writing text to the standard output stream to fail. To avoid having to handle the failure case of printing to a standard output, you can use alternate functions: the std.log function for proper logging or the std.debug.print function.