fixed nimble check and compatibility with new nim compiler (strings can't be nil)

This commit is contained in:
Giovanni 2018-09-05 15:22:45 +09:00 committed by Ruslan Mustakov
commit c5039c1cc6
4 changed files with 3 additions and 6 deletions

2
.gitignore vendored
View file

@ -1,5 +1,3 @@
**/uuids
.vscode/.browse.*
nimsuggest.log

View file

@ -1,6 +1,6 @@
import strutils, hashes
import isaac
import urandom
import uuids/urandom
type
UUID* = object
@ -20,7 +20,7 @@ template toHex(s: string, start: Natural,
if n == 0 and x < 0: n = -1
proc uuidsParseHexInt(s: string, maxLen: int): int64 =
if s.isNil or s.len == 0:
if s.len == 0:
raise newException(ValueError, "UUID part is empty")
if s.len > maxLen or s.len > sizeof(result) * 2:
raise newException(ValueError, "UUID part is longer than expected")

View file

@ -1,10 +1,9 @@
[Package]
name: "uuids"
version: "0.1.9"
version: "0.1.10"
author: "Xored Software, Inc."
description: "UUID library"
license: "MIT"
srcDir: "src"
[Deps]
requires: "isaac >= 0.1.3"