From f9c05ed21e6be17c0d1e16a364a0ab19fe4a64bf Mon Sep 17 00:00:00 2001 From: Ludovic Chenut Date: Tue, 10 Oct 2023 15:02:24 +0200 Subject: [PATCH] Fix some typo --- binary_serialization/reader.nim | 4 ++-- binary_serialization/writer.nim | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/binary_serialization/reader.nim b/binary_serialization/reader.nim index cc11e78..1720b64 100644 --- a/binary_serialization/reader.nim +++ b/binary_serialization/reader.nim @@ -43,12 +43,12 @@ proc readValue*[T](r: var BinaryReader, value: var T) = value = fromBytes(type value, r.stream.read(length), bigEndian) elif value is enum: var asUInt: E - r.readValue(asUint) + r.readValue(asUInt) #TODO raise instead assert value.checkedEnumAssign(asUInt): elif value is set: var asUInt: E - r.readValue(asUint) + r.readValue(asUInt) #TODO is this safe enough? value = cast[type(value)](asUInt) elif value is object: diff --git a/binary_serialization/writer.nim b/binary_serialization/writer.nim index 619758d..0b39d05 100644 --- a/binary_serialization/writer.nim +++ b/binary_serialization/writer.nim @@ -76,7 +76,7 @@ proc writeValue*(w: var BinaryWriter, value: auto) = w.stream.write w.workingByte w.position = 0 w.workingByte = 0 - elif value is seq | array | openarray: + elif value is seq | array | openArray: for subV in value: w.writeValue(subV) else: