Skip to content

Commit

Permalink
Merge pull request #23 from libp2p/feat/remove-chan
Browse files Browse the repository at this point in the history
remove "Chan" type
  • Loading branch information
marten-seemann authored Aug 5, 2021
2 parents 7083218 + e20bcc3 commit 453c310
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 224 deletions.
109 changes: 0 additions & 109 deletions chan.go

This file was deleted.

113 changes: 0 additions & 113 deletions chan_test.go

This file was deleted.

3 changes: 3 additions & 0 deletions limit_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,7 @@ func TestLimitWriter(t *testing.T) {
t.Fatal("Expected to write 3 bytes with no errors")
}
err = writer.Flush()
if err != nil {
t.Fatal(err)
}
}
9 changes: 7 additions & 2 deletions msgio_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ import (
"time"
)

func randBuf(r *rand.Rand, size int) []byte {
buf := make([]byte, size)
_, _ = r.Read(buf)
return buf
}

func TestReadWrite(t *testing.T) {
buf := bytes.NewBuffer(nil)
writer := NewWriter(buf)
Expand Down Expand Up @@ -54,8 +60,7 @@ type testIoReadWriter struct {

func TestReadWriterClose(t *testing.T) {
r, w := io.Pipe()
var rw ReadWriteCloser
rw = NewReadWriter(testIoReadWriter{r, w})
rw := NewReadWriter(testIoReadWriter{r, w})
SubtestReaderWriterClose(t, rw)
}

Expand Down

0 comments on commit 453c310

Please sign in to comment.