shutil._copyfileobj_readinto: tiny speedup (#92377)

This commit is contained in:
Lucinda May Phipps 2022-05-20 16:14:05 +01:00 committed by GitHub
parent f20a6a54fb
commit 87b9b4e060
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -182,7 +182,8 @@ def _copyfileobj_readinto(fsrc, fdst, length=COPY_BUFSIZE):
break
elif n < length:
with mv[:n] as smv:
fdst.write(smv)
fdst_write(smv)
break
else:
fdst_write(mv)