rm deprecated ValidIpAddress support (#80)

This commit is contained in:
tersec 2024-01-27 08:38:33 +00:00 committed by GitHub
parent c9705eee64
commit 6b3c9b5e43
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 8 deletions

View File

@ -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)