mirror of
https://github.com/odin-lang/Odin.git
synced 2026-08-14 01:34:35 +00:00
compress/gzip: Fix example code
I tried to compile this example and received the following error:
```
Error: Cannot assign value 'os.stdin.stream' of type 'File_Stream' to 'Stream' in a structure literal
input = os.stdin.stream,
^~~~~~~~~~~~~~^
```
The example was fixed by passing the File_Stream to `os.to_stream`.
Signed-off-by: Robert Stefanic <rstefanic72@gmail.com>
This commit is contained in:
@@ -53,7 +53,7 @@ Example:
|
||||
if file == "-" {
|
||||
// Read from stdin
|
||||
ctx := &compress.Context_Stream_Input{
|
||||
input = os.stdin.stream,
|
||||
input = os.to_stream(os.stdin),
|
||||
}
|
||||
err = gzip.load(ctx, &buf)
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user