Skip to content

Commit 6fa3825

Browse files
committed
Drop backwards compatibility workarounds
1 parent b61bec8 commit 6fa3825

File tree

2 files changed

+3
-14
lines changed

2 files changed

+3
-14
lines changed

docopt.nimble

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ description: "Command line option parser that will make you smile"
66
license: "MIT"
77
srcDir: "src"
88
[Deps]
9-
requires: "nim >= 0.14.0"
9+
requires: "nim >= 0.15.0"

src/private/util.nim

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,8 @@ proc partition*(s, sep: string): tuple[left, sep, right: string] =
4343
4444
proc is_upper*(s: string): bool =
4545
## Is the string in uppercase (and there is at least one cased character)?
46-
# Backwards compatibility
47-
when compiles(unicode.to_upper("")):
48-
let upper = unicode.to_upper(s)
49-
s == upper and upper != unicode.to_lower(s)
50-
else:
51-
let upper = strutils.to_upper(s)
52-
s == upper and upper != strutils.to_lower(s)
46+
let upper = unicode.to_upper(s)
47+
s == upper and upper != unicode.to_lower(s)
5348
5449
5550
macro gen_class*(body: untyped): untyped =
@@ -62,9 +57,3 @@ macro gen_class*(body: untyped): untyped =
6257
meth &= "= \"$1\""
6358
body.add(parse_stmt(meth.format(typ[0])))
6459
body
65-
66-
67-
# Backwards compatibility
68-
when not compiles("".split_whitespace()):
69-
proc split_whitespace*(s: string): seq[string] =
70-
s.split()

0 commit comments

Comments
 (0)