From ce7caec4b3beab913d801e6be7f0bed0728c791c Mon Sep 17 00:00:00 2001 From: Timothee Cour Date: Mon, 22 Feb 2021 11:13:08 -0800 Subject: add io.readChars overload (simpler, less error prone) (#16044) * add simpler to use readChars overload * use new readChars overload * Update lib/wrappers/openssl.nim Co-authored-by: Andreas Rumpf Co-authored-by: flywind --- lib/std/sha1.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/std') diff --git a/lib/std/sha1.nim b/lib/std/sha1.nim index 958ac8ab0..b74b285f8 100644 --- a/lib/std/sha1.nim +++ b/lib/std/sha1.nim @@ -231,7 +231,7 @@ proc secureHashFile*(filename: string): SecureHash = var state = newSha1State() var buffer = newString(BufferLength) while true: - let length = readChars(f, buffer, 0, BufferLength) + let length = readChars(f, buffer) if length == 0: break buffer.setLen(length) -- cgit 1.4.1-2-gfad0