summary refs log tree commit diff stats
path: root/lib/std
diff options
context:
space:
mode:
authorTimothee Cour <timothee.cour2@gmail.com>2021-02-22 11:13:08 -0800
committerGitHub <noreply@github.com>2021-02-22 20:13:08 +0100
commitce7caec4b3beab913d801e6be7f0bed0728c791c (patch)
tree90925ddba95a130a36dec641e31b3c63ae62cf35 /lib/std
parenta1f41137059fcb5b16e3c95b1e63c4a5ed08a408 (diff)
downloadNim-ce7caec4b3beab913d801e6be7f0bed0728c791c.tar.gz
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 <rumpf_a@web.de>
Co-authored-by: flywind <xzsflywind@gmail.com>
Diffstat (limited to 'lib/std')
-rw-r--r--lib/std/sha1.nim2
1 files changed, 1 insertions, 1 deletions
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)