simplify HardLimitReader by using LimitReader for internal usage (#17218)

This commit is contained in:
Klaus Post
2023-05-16 13:14:37 -07:00
committed by GitHub
parent 413549bcf5
commit aaf1abc993
6 changed files with 16 additions and 31 deletions

View File

@@ -413,7 +413,7 @@ func (r *BatchJobReplicateV1) copyWithMultipartfromSource(ctx context.Context, a
}
defer rd.Close()
hr, err = hash.NewLimitReader(rd, objInfo.Size, "", "", objInfo.Size)
hr, err = hash.NewReader(io.LimitReader(rd, objInfo.Size), objInfo.Size, "", "", objInfo.Size)
if err != nil {
return err
}