summaryrefslogtreecommitdiff
path: root/internal/fastio/allwriter.go
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@lukeshu.com>2023-02-18 22:45:30 -0700
committerLuke Shumaker <lukeshu@lukeshu.com>2023-02-18 22:45:30 -0700
commitcf75ff06887d7bbb5bbbd682587b9d3f5e474670 (patch)
tree7f8999f73fa4e4c5759a174cebed7c8919fa05e1 /internal/fastio/allwriter.go
parent1b773c966cdb6b38cc4bc73e218793db3a9442ba (diff)
parentec0482f598f4b7b05c21b1d19fe8183665e3fe93 (diff)
Merge branch 'lukeshu/scan-tidy'
Diffstat (limited to 'internal/fastio/allwriter.go')
-rw-r--r--internal/fastio/allwriter.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/internal/fastio/allwriter.go b/internal/fastio/allwriter.go
index c587531..071d709 100644
--- a/internal/fastio/allwriter.go
+++ b/internal/fastio/allwriter.go
@@ -139,6 +139,9 @@ func (w writerYYNWrapper) WriteString(s string) (int, error) { return WriteStrin
// the io.Writer already has any of the other write methods, then its
// native version of those methods are used.
func NewAllWriter(inner io.Writer) AllWriter {
+ if inner == io.Discard {
+ return Discard
+ }
switch inner := inner.(type) {
// 3 Y bits
case AllWriter: // YYY: