Skip to content

Commit

Permalink
Document a few fixes (#45)
Browse files Browse the repository at this point in the history
  • Loading branch information
arnetheduck committed Mar 11, 2024
1 parent d285bf0 commit e2adf66
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ on:
push:
branches:
- master
- test-*
pull_request:
workflow_dispatch:
inputs:
Expand Down
8 changes: 4 additions & 4 deletions results.nim
Original file line number Diff line number Diff line change
Expand Up @@ -300,16 +300,16 @@ type
## https://github.com/nim-lang/Nim/issues/13799 - type issues
## https://github.com/nim-lang/Nim/issues/8745 - genericReset slow
## https://github.com/nim-lang/Nim/issues/13879 - double-zero-init slow
## https://github.com/nim-lang/Nim/issues/14318 - generic error raises pragma
## https://github.com/nim-lang/Nim/issues/14318 - generic error raises pragma (fixed in 1.6.14+)

# TODO https://github.com/nim-lang/Nim/issues/20699
# https://github.com/nim-lang/Nim/issues/20699 (fixed in 2.0.0+)
# case oResultPrivate: bool
# of false:
# eResultPrivate: E
# of true:
# vResultPrivate: T

# TODO ResultPrivate works around
# ResultPrivate* works around (fixed in 1.6.14+):
# * https://github.com/nim-lang/Nim/issues/3770
# * https://github.com/nim-lang/Nim/issues/20900
#
Expand Down Expand Up @@ -974,7 +974,7 @@ template unsafeGet*[E](self: Result[void, E]) =
self.unsafeValue()

# `var` overloads should not be needed but result in invalid codegen (!):
# TODO https://github.com/nim-lang/Nim/issues/22049
# https://github.com/nim-lang/Nim/issues/22049 (fixed in 1.6.16+)
func get*[T: not void, E](self: var Result[T, E]): var T =
self.value()

Expand Down

0 comments on commit e2adf66

Please sign in to comment.