fixed nimble check and compatibility with new nim compiler (strings can't be nil)
This commit is contained in:
parent
2ff415fb2b
commit
c5039c1cc6
4 changed files with 3 additions and 6 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
|
@ -1,5 +1,3 @@
|
|||
**/uuids
|
||||
|
||||
.vscode/.browse.*
|
||||
nimsuggest.log
|
||||
|
||||
|
|
|
|||
|
|
@ -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")
|
||||
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue