From da29222f86f7689227ffe12605842d18c9bf0fc1 Mon Sep 17 00:00:00 2001 From: Andreas Rumpf Date: Tue, 23 Jun 2020 10:53:57 +0200 Subject: init checks and 'out' parameters (#14521) * I don't care about observable stores * enforce explicit initializations * cleaner code for the stdlib * stdlib: use explicit initializations * make tests green * algorithm.nim: set result explicitly * remove out parameters and bring the PR into a mergable state * updated the changelog --- lib/pure/pathnorm.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/pure/pathnorm.nim') diff --git a/lib/pure/pathnorm.nim b/lib/pure/pathnorm.nim index 8763ba878..03a65bd60 100644 --- a/lib/pure/pathnorm.nim +++ b/lib/pure/pathnorm.nim @@ -44,7 +44,7 @@ proc next*(it: var PathIter; x: string): (int, int) = it.notFirst = true iterator dirs(x: string): (int, int) = - var it: PathIter + var it = default PathIter while hasNext(it, x): yield next(it, x) proc isDot(x: string; bounds: (int, int)): bool = -- cgit 1.4.1-2-gfad0