Skip to content

Commit db51941

Browse files
committed
Fix examples
1 parent c456e5d commit db51941

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

examples/counted.nim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@ Try: counted -vvvvvvvvvv
1111
counted this.txt that.txt
1212
"""
1313

14-
import strutils
14+
import strutils, unicode
1515
import docopt
1616

1717

1818
let args = docopt(doc)
1919
echo args
2020

2121
if args["-v"]:
22-
echo capitalize(repeat("very ", args["-v"].len - 1) & "verbose")
22+
echo unicode.capitalize(repeat("very ", args["-v"].len - 1) & "verbose")
2323

2424
for path in @(args["--path"]):
2525
echo read_file(path)

examples/cycle.nim

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,15 @@ if not infinite:
2424

2525
var interval = 0
2626
if args["--interval"]:
27-
interval = round(parse_float($args["--interval"])*1000)
27+
interval = to_int(parse_float($args["--interval"])*1000)
2828

2929
while true:
3030
for s in @(args["<what>"]):
3131
echo s
32-
32+
3333
if interval > 0:
3434
sleep interval
35-
35+
3636
if not infinite:
3737
dec n
3838
if n <= 0:

0 commit comments

Comments
 (0)