da9f5e815bf460c63ba151a032db18a944db79ab — Thomas Landin 4 months ago 6cd9ffd
ord() already does the right thing with enums

We don't need to shadow the built-in `ord()`.
1 files changed, 5 insertions(+), 3 deletions(-)

M src/dtt.nim
M src/dtt.nim => src/dtt.nim +5 -3
@@ 26,9 26,6 @@ type

proc ord(dtterror: DttError): int =
  result = ord(dtterror)

proc initCmd(dir: string, force: bool = false) =
  var wd: string = dir
  if dir == "nil":

@@ 36,6 33,11 @@ proc initCmd(dir: string, force: bool = false) =
    os.createDir(os.getCurrentDir() / dir)

  # TODO: Update this so that init will re-create any -missing- files
  # but won't overwrite existing files.
  # My hunch is that the best way to do this is to have a list of things
  # to create and as we walk that list we check them one by one if the target
  # already exists, overriding it with `force`.
  if not force:
    if os.existsDir(wd):
      for f in walkDirRec(wd, {pcFile, pcDir}, relative = true):