Work-around a Nim compilation error

This commit is contained in:
Zahary Karadjov 2021-11-04 12:19:17 +02:00
parent 3669b90ceb
commit cf8a1a60a4
1 changed files with 2 additions and 1 deletions

View File

@ -30,7 +30,8 @@ type
func `$`*(pid: PeerID): string = func `$`*(pid: PeerID): string =
## Return base58 encoded ``pid`` representation. ## Return base58 encoded ``pid`` representation.
Base58.encode(pid.data) # This unusual call syntax is used to avoid a strange Nim compilation error
base58.encode(Base58, pid.data)
func shortLog*(pid: PeerId): string = func shortLog*(pid: PeerId): string =
## Returns compact string representation of ``pid``. ## Returns compact string representation of ``pid``.