Skip to content

Commit

Permalink
make it nim1.4+ compatible
Browse files Browse the repository at this point in the history
  • Loading branch information
lchenut committed Aug 4, 2022
1 parent 5c1f4c0 commit a3c09ed
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion libp2p/dialer.nim
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ proc negotiateStream(
method tryDial*(
self: Dialer,
peerId: PeerId,
addrs: seq[MultiAddress]): Future[MultiAddress] {.raises: [Defect], async.} =
addrs: seq[MultiAddress]): Future[MultiAddress] {.async.} =
## Create a protocol stream and in order to check
## if a connection is possible.
## Doesn't use the Connection Manager to save it.
Expand Down
5 changes: 4 additions & 1 deletion libp2p/protocols/autonat.nim
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@
# This file may not be copied, modified, or distributed except according to
# those terms.

{.push raises: [Defect].}
when (NimMajor, NimMinor) < (1, 4):
{.push raises: [Defect].}
else:
{.push raises: [].}

import std/[options, sets, sequtils]
import chronos, chronicles, stew/objects
Expand Down

0 comments on commit a3c09ed

Please sign in to comment.