Skip to content

Commit

Permalink
will be addressed in a new pr
Browse files Browse the repository at this point in the history
  • Loading branch information
diegomrsantos committed Jun 5, 2024
2 parents 8a9a547 + f9a6ef0 commit dbfbc65
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
10 changes: 9 additions & 1 deletion libp2p/utility.nim
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

{.push raises: [].}

import std/[options, macros]
import std/[sets, options, macros]
import stew/[byteutils, results]

export results
Expand Down Expand Up @@ -136,3 +136,11 @@ template toOpt*[T, E](self: Result[T, E]): Opt[T] =
else: Opt.some(temp.unsafeGet())
else:
Opt.none(type(T))

template exclIfIt*[T](set: var HashSet[T], condition: untyped) =
if set.len != 0:
var toExcl = HashSet[T]()
for it {.inject.} in set:
if condition:
toExcl.incl(it)
set.excl(toExcl)
2 changes: 1 addition & 1 deletion scripts/build_p2pd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
set -e

CACHE_DIR="$1" # optional parameter pointing to a CI cache dir.
LIBP2P_COMMIT="v0.2.1" # tags work too, only used in nim-libp2p CI for now
LIBP2P_COMMIT="124530a3" # Tags maye be used as well
[[ -n "$2" ]] && LIBP2P_COMMIT="$2" # allow overriding it on the command line
SUBREPO_DIR="vendor/go/src/github.com/libp2p/go-libp2p-daemon"
if [[ ! -e "$SUBREPO_DIR" ]]; then
Expand Down

0 comments on commit dbfbc65

Please sign in to comment.