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.*
|
.vscode/.browse.*
|
||||||
nimsuggest.log
|
nimsuggest.log
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import strutils, hashes
|
import strutils, hashes
|
||||||
import isaac
|
import isaac
|
||||||
import urandom
|
import uuids/urandom
|
||||||
|
|
||||||
type
|
type
|
||||||
UUID* = object
|
UUID* = object
|
||||||
|
|
@ -20,7 +20,7 @@ template toHex(s: string, start: Natural,
|
||||||
if n == 0 and x < 0: n = -1
|
if n == 0 and x < 0: n = -1
|
||||||
|
|
||||||
proc uuidsParseHexInt(s: string, maxLen: int): int64 =
|
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")
|
raise newException(ValueError, "UUID part is empty")
|
||||||
if s.len > maxLen or s.len > sizeof(result) * 2:
|
if s.len > maxLen or s.len > sizeof(result) * 2:
|
||||||
raise newException(ValueError, "UUID part is longer than expected")
|
raise newException(ValueError, "UUID part is longer than expected")
|
||||||
|
|
@ -1,10 +1,9 @@
|
||||||
[Package]
|
[Package]
|
||||||
name: "uuids"
|
name: "uuids"
|
||||||
version: "0.1.9"
|
version: "0.1.10"
|
||||||
author: "Xored Software, Inc."
|
author: "Xored Software, Inc."
|
||||||
description: "UUID library"
|
description: "UUID library"
|
||||||
license: "MIT"
|
license: "MIT"
|
||||||
srcDir: "src"
|
|
||||||
|
|
||||||
[Deps]
|
[Deps]
|
||||||
requires: "isaac >= 0.1.3"
|
requires: "isaac >= 0.1.3"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue