Merge pull request #3467 from greatroar/wrappedconn-pointer

Use rclone.wrappedConn by pointer
This commit is contained in:
MichaelEischer 2021-08-04 21:18:53 +02:00 committed by GitHub
commit 533ac4fd95
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -104,16 +104,16 @@ type wrappedConn struct {
io.Writer
}
func (c wrappedConn) Read(p []byte) (int, error) {
func (c *wrappedConn) Read(p []byte) (int, error) {
return c.Reader.Read(p)
}
func (c wrappedConn) Write(p []byte) (int, error) {
func (c *wrappedConn) Write(p []byte) (int, error) {
return c.Writer.Write(p)
}
func wrapConn(c *StdioConn, lim limiter.Limiter) wrappedConn {
wc := wrappedConn{
func wrapConn(c *StdioConn, lim limiter.Limiter) *wrappedConn {
wc := &wrappedConn{
StdioConn: c,
Reader: c,
Writer: c,