Skip to content

Commit 78b15de

Browse files
authored
[backport] remove 'CountTable.mget' (#13355)
It didn't work, and it was an oversight to be included in v1.0.
1 parent 36d1ad3 commit 78b15de

File tree

2 files changed

+9
-17
lines changed

2 files changed

+9
-17
lines changed

changelog.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@
1919
- Global variable `lc` has been removed from sugar.nim.
2020
- `distinctBase` has been moved from sugar.nim to typetraits and now implemented as
2121
compiler type trait instead of macro. `distinctBase` in sugar module is now deprecated.
22+
- `CountTable.mget` has been removed from `tables.nim`. It didn't work, and it
23+
was an oversight to be included in v1.0.
24+
2225

2326
### Breaking changes in the compiler
2427

@@ -50,11 +53,12 @@
5053
- Added `times.fromUnixFloat,toUnixFloat`, subsecond resolution versions of `fromUnix`,`toUnixFloat`.
5154
- Added `wrapnils` module for chains of field-access and indexing where the LHS can be nil.
5255
This simplifies code by reducing need for if-else branches around intermediate maybe nil values.
53-
Eg: `echo ?.n.typ.kind`
56+
E.g. `echo ?.n.typ.kind`
5457
- Added `minIndex` and `maxIndex` to the `sequtils` module
5558
- Added `os.isRelativeTo` to tell whether a path is relative to another
5659
- Added `resetOutputFormatters` to `unittest`
5760

61+
5862
## Library changes
5963

6064
- `asynchttpserver` now the request body is a FutureStream.
@@ -71,9 +75,10 @@
7175
- `htmlgen.html` allows `lang` on the `<html>` tag and common valid attributes.
7276
- `macros.basename` and `basename=` got support for `PragmaExpr`,
7377
so that an expression like `MyEnum {.pure.}` is handled correctly.
74-
- `httpclient.maxredirects` changed from `int` to `Natural`, because negative values serve no purpose whatsoever.
75-
- `httpclient.newHttpClient` and `httpclient.newAsyncHttpClient` added `headers` argument to set initial HTTP Headers,
76-
instead of a hardcoded empty `newHttpHeader()`.
78+
- `httpclient.maxredirects` changed from `int` to `Natural`, because negative values
79+
serve no purpose whatsoever.
80+
- `httpclient.newHttpClient` and `httpclient.newAsyncHttpClient` added `headers`
81+
argument to set initial HTTP Headers, instead of a hardcoded empty `newHttpHeader()`.
7782

7883

7984
## Language additions

lib/pure/collections/tables.nim

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2304,13 +2304,6 @@ proc `[]`*[A](t: CountTable[A], key: A): int =
23042304
assert(not t.isSorted, "CountTable must not be used after sorting")
23052305
ctget(t, key, 0)
23062306
2307-
proc mget*[A](t: var CountTable[A], key: A): var int =
2308-
## Retrieves the value at ``t[key]``. The value can be modified.
2309-
##
2310-
## If ``key`` is not in ``t``, the ``KeyError`` exception is raised.
2311-
assert(not t.isSorted, "CountTable must not be used after sorting")
2312-
get(t, key)
2313-
23142307
proc `[]=`*[A](t: var CountTable[A], key: A, val: int) =
23152308
## Inserts a ``(key, value)`` pair into ``t``.
23162309
##
@@ -2674,12 +2667,6 @@ proc `[]`*[A](t: CountTableRef[A], key: A): int =
26742667
## is in the table
26752668
result = t[][key]
26762669
2677-
proc mget*[A](t: CountTableRef[A], key: A): var int =
2678-
## Retrieves the value at ``t[key]``. The value can be modified.
2679-
##
2680-
## If ``key`` is not in ``t``, the ``KeyError`` exception is raised.
2681-
mget(t[], key)
2682-
26832670
proc `[]=`*[A](t: CountTableRef[A], key: A, val: int) =
26842671
## Inserts a ``(key, value)`` pair into ``t``.
26852672
##

0 commit comments

Comments
 (0)