update deprecated example (#19415)

`toNimIdent` proc is deprecated, so I replaced it with `ident` proc
This commit is contained in:
Hamid Bluri 2022-01-18 12:55:39 -08:00 • committed by GitHub
commit 5d303762f1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1373,7 +1373,7 @@ template findChild*(n: NimNode; cond: untyped): NimNode {.dirty.} =
##
## .. code-block:: nim
## var res = findChild(n, it.kind == nnkPostfix and
## it.basename.ident == toNimIdent"foo")
## it.basename.ident == ident"foo")
block:
var res: NimNode
for it in n.children: