1
0
mirror of https://github.com/restic/restic.git synced 2024-06-28 08:00:52 +02:00

Remove unneeded byte counters

This commit is contained in:
Alexander Neumann 2018-03-30 09:52:46 +02:00
parent c43c94776b
commit 86f4b03730

View File

@ -13,20 +13,17 @@ import (
type StdioConn struct {
stdin *os.File
stdout *os.File
bytesWritten, bytesRead int
cmd *exec.Cmd
close sync.Once
}
func (s *StdioConn) Read(p []byte) (int, error) {
n, err := s.stdin.Read(p)
s.bytesRead += n
return n, err
}
func (s *StdioConn) Write(p []byte) (int, error) {
n, err := s.stdout.Write(p)
s.bytesWritten += n
return n, err
}