summary refs log tree commit diff stats
path: root/lib/pure
diff options
context:
space:
mode:
authormetagn <metagngn@gmail.com>2023-04-17 21:55:22 +0300
committerGitHub <noreply@github.com>2023-04-17 20:55:22 +0200
commitb0a98cc01e14a33d75866c10c290f63031dc2112 (patch)
tree8d73def13ac7699326e885be4b9bd6260aa454ea /lib/pure
parent2621f78b683592dced21cd93aa241deac8a9232f (diff)
downloadNim-b0a98cc01e14a33d75866c10c290f63031dc2112.tar.gz
warn on set types bigger than max size, default to 0..255 for int literals (#21659)
* test implicitly huge set types

refs https://github.com/nim-lang/RFCs/issues/298

* oh my god

* boot at least

* don't error, fix remaining issues, no 2 len arrays

* fix runnable example

* test assuming 0..255 for int literal

* test refactor, add changelog, test
Diffstat (limited to 'lib/pure')
-rw-r--r--lib/pure/httpcore.nim10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/pure/httpcore.nim b/lib/pure/httpcore.nim
index d639bef05..3b5cbc3cf 100644
--- a/lib/pure/httpcore.nim
+++ b/lib/pure/httpcore.nim
@@ -348,20 +348,20 @@ func is1xx*(code: HttpCode): bool {.inline, since: (1, 5).} =
   runnableExamples:
     doAssert is1xx(HttpCode(103))
 
-  code.int in {100 .. 199}
+  code.int in 100 .. 199
 
 func is2xx*(code: HttpCode): bool {.inline.} =
   ## Determines whether `code` is a 2xx HTTP status code.
-  code.int in {200 .. 299}
+  code.int in 200 .. 299
 
 func is3xx*(code: HttpCode): bool {.inline.} =
   ## Determines whether `code` is a 3xx HTTP status code.
-  code.int in {300 .. 399}
+  code.int in 300 .. 399
 
 func is4xx*(code: HttpCode): bool {.inline.} =
   ## Determines whether `code` is a 4xx HTTP status code.
-  code.int in {400 .. 499}
+  code.int in 400 .. 499
 
 func is5xx*(code: HttpCode): bool {.inline.} =
   ## Determines whether `code` is a 5xx HTTP status code.
-  code.int in {500 .. 599}
+  code.int in 500 .. 599