Skip to content

Commit

Permalink
[backport] remove 'CountTable.mget' (nim-lang#13355)
Browse files Browse the repository at this point in the history
It didn't work, and it was an oversight to be included in v1.0.

(cherry picked from commit 78b15de)
  • Loading branch information
narimiran committed Feb 19, 2020
1 parent bdb679c commit 3bf9ef5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 14 deletions.
5 changes: 4 additions & 1 deletion changelog.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# v1.1 - xxxx-xx-xx
# v1.0.8 - xxxx-xx-xx


## Changes affecting backwards compatibility
Expand All @@ -7,6 +7,9 @@

### Breaking changes in the standard library

- `CountTable.mget` has been removed from `tables.nim`. It didn't work, and it
was an oversight to be included in v1.0.



### Breaking changes in the compiler
Expand Down
13 changes: 0 additions & 13 deletions lib/pure/collections/tables.nim
Original file line number Diff line number Diff line change
Expand Up @@ -2239,13 +2239,6 @@ proc `[]`*[A](t: CountTable[A], key: A): int =
assert(not t.isSorted, "CountTable must not be used after sorting")
ctget(t, key, 0)

proc mget*[A](t: var CountTable[A], key: A): var int =
## Retrieves the value at ``t[key]``. The value can be modified.
##
## If ``key`` is not in ``t``, the ``KeyError`` exception is raised.
assert(not t.isSorted, "CountTable must not be used after sorting")
get(t, key)

proc `[]=`*[A](t: var CountTable[A], key: A, val: int) =
## Inserts a ``(key, value)`` pair into ``t``.
##
Expand Down Expand Up @@ -2560,12 +2553,6 @@ proc `[]`*[A](t: CountTableRef[A], key: A): int =
## is in the table
result = t[][key]

proc mget*[A](t: CountTableRef[A], key: A): var int =
## Retrieves the value at ``t[key]``. The value can be modified.
##
## If ``key`` is not in ``t``, the ``KeyError`` exception is raised.
mget(t[], key)

proc `[]=`*[A](t: CountTableRef[A], key: A, val: int) =
## Inserts a ``(key, value)`` pair into ``t``.
##
Expand Down

0 comments on commit 3bf9ef5

Please sign in to comment.