[backport] remove 'CountTable.mget' (#13355)
It didn't work, and it was an oversight to be included in v1.0.
This commit is contained in:
parent
36d1ad39d0
commit
78b15de304
2 changed files with 9 additions and 17 deletions
13
changelog.md
13
changelog.md
|
|
@ -19,6 +19,9 @@
|
||||||
- Global variable `lc` has been removed from sugar.nim.
|
- Global variable `lc` has been removed from sugar.nim.
|
||||||
- `distinctBase` has been moved from sugar.nim to typetraits and now implemented as
|
- `distinctBase` has been moved from sugar.nim to typetraits and now implemented as
|
||||||
compiler type trait instead of macro. `distinctBase` in sugar module is now deprecated.
|
compiler type trait instead of macro. `distinctBase` in sugar module is now deprecated.
|
||||||
|
- `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
|
### Breaking changes in the compiler
|
||||||
|
|
||||||
|
|
@ -50,11 +53,12 @@
|
||||||
- Added `times.fromUnixFloat,toUnixFloat`, subsecond resolution versions of `fromUnix`,`toUnixFloat`.
|
- Added `times.fromUnixFloat,toUnixFloat`, subsecond resolution versions of `fromUnix`,`toUnixFloat`.
|
||||||
- Added `wrapnils` module for chains of field-access and indexing where the LHS can be nil.
|
- Added `wrapnils` module for chains of field-access and indexing where the LHS can be nil.
|
||||||
This simplifies code by reducing need for if-else branches around intermediate maybe nil values.
|
This simplifies code by reducing need for if-else branches around intermediate maybe nil values.
|
||||||
Eg: `echo ?.n.typ.kind`
|
E.g. `echo ?.n.typ.kind`
|
||||||
- Added `minIndex` and `maxIndex` to the `sequtils` module
|
- Added `minIndex` and `maxIndex` to the `sequtils` module
|
||||||
- Added `os.isRelativeTo` to tell whether a path is relative to another
|
- Added `os.isRelativeTo` to tell whether a path is relative to another
|
||||||
- Added `resetOutputFormatters` to `unittest`
|
- Added `resetOutputFormatters` to `unittest`
|
||||||
|
|
||||||
|
|
||||||
## Library changes
|
## Library changes
|
||||||
|
|
||||||
- `asynchttpserver` now the request body is a FutureStream.
|
- `asynchttpserver` now the request body is a FutureStream.
|
||||||
|
|
@ -71,9 +75,10 @@
|
||||||
- `htmlgen.html` allows `lang` on the `<html>` tag and common valid attributes.
|
- `htmlgen.html` allows `lang` on the `<html>` tag and common valid attributes.
|
||||||
- `macros.basename` and `basename=` got support for `PragmaExpr`,
|
- `macros.basename` and `basename=` got support for `PragmaExpr`,
|
||||||
so that an expression like `MyEnum {.pure.}` is handled correctly.
|
so that an expression like `MyEnum {.pure.}` is handled correctly.
|
||||||
- `httpclient.maxredirects` changed from `int` to `Natural`, because negative values serve no purpose whatsoever.
|
- `httpclient.maxredirects` changed from `int` to `Natural`, because negative values
|
||||||
- `httpclient.newHttpClient` and `httpclient.newAsyncHttpClient` added `headers` argument to set initial HTTP Headers,
|
serve no purpose whatsoever.
|
||||||
instead of a hardcoded empty `newHttpHeader()`.
|
- `httpclient.newHttpClient` and `httpclient.newAsyncHttpClient` added `headers`
|
||||||
|
argument to set initial HTTP Headers, instead of a hardcoded empty `newHttpHeader()`.
|
||||||
|
|
||||||
|
|
||||||
## Language additions
|
## Language additions
|
||||||
|
|
|
||||||
|
|
@ -2304,13 +2304,6 @@ proc `[]`*[A](t: CountTable[A], key: A): int =
|
||||||
assert(not t.isSorted, "CountTable must not be used after sorting")
|
assert(not t.isSorted, "CountTable must not be used after sorting")
|
||||||
ctget(t, key, 0)
|
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) =
|
proc `[]=`*[A](t: var CountTable[A], key: A, val: int) =
|
||||||
## Inserts a ``(key, value)`` pair into ``t``.
|
## Inserts a ``(key, value)`` pair into ``t``.
|
||||||
##
|
##
|
||||||
|
|
@ -2674,12 +2667,6 @@ proc `[]`*[A](t: CountTableRef[A], key: A): int =
|
||||||
## is in the table
|
## is in the table
|
||||||
result = t[][key]
|
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) =
|
proc `[]=`*[A](t: CountTableRef[A], key: A, val: int) =
|
||||||
## Inserts a ``(key, value)`` pair into ``t``.
|
## Inserts a ``(key, value)`` pair into ``t``.
|
||||||
##
|
##
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue