From 6b3c9b5e430483552af86b3b9a8a78595f4fd9bd Mon Sep 17 00:00:00 2001 From: tersec Date: Sat, 27 Jan 2024 08:38:33 +0000 Subject: [PATCH] rm deprecated ValidIpAddress support (#80) --- json_serialization/std/net.nim | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/json_serialization/std/net.nim b/json_serialization/std/net.nim index 16a00cd..1b996d7 100644 --- a/json_serialization/std/net.nim +++ b/json_serialization/std/net.nim @@ -1,5 +1,5 @@ # json-serialization -# Copyright (c) 2019-2023 Status Research & Development GmbH +# Copyright (c) 2019-2024 Status Research & Development GmbH # Licensed under either of # * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE)) # * MIT license ([LICENSE-MIT](LICENSE-MIT)) @@ -8,7 +8,7 @@ # those terms. import - std/strutils, stew/shims/net, + std/net, ../../json_serialization, chronos/transports/common export @@ -25,12 +25,6 @@ proc readValue*(reader: var JsonReader, value: var IpAddress) = except CatchableError: raiseUnexpectedValue(reader, "Invalid IP address") -template writeValue*(writer: var JsonWriter, value: ValidIpAddress) = - writeValue writer, IpAddress(value) - -template readValue*(reader: var JsonReader, value: var ValidIpAddress) = - readValue reader, IpAddress(value) - proc writeValue*( writer: var JsonWriter, value: Port) {.raises: [IOError].} = writeValue(writer, uint16 value)