diff options
author | David Krause <enthus1ast@users.noreply.github.com> | 2022-02-14 08:56:35 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-14 08:56:35 +0100 |
commit | cda77c15209519ea04f889a826ac79c7cbb7e152 (patch) | |
tree | cbae82f775ea7a0d51e1bf690b65b9b473f51773 /lib | |
parent | 551225d88808c6029d9246cf2bea5da349d1eb43 (diff) | |
download | Nim-cda77c15209519ea04f889a826ac79c7cbb7e152.tar.gz |
use OrderedTable instead of OrderedTableRef for mimedb (#19522)
* use OrderedTable instead of OrderedTableRef for mimedb Signed-off-by: David Krause <enthus1ast@users.noreply.github.com> * added changelog entry for mimedb change Signed-off-by: David Krause <enthus1ast@users.noreply.github.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/pure/mimetypes.nim | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/pure/mimetypes.nim b/lib/pure/mimetypes.nim index 6ae63a0ae..d1566d897 100644 --- a/lib/pure/mimetypes.nim +++ b/lib/pure/mimetypes.nim @@ -31,7 +31,7 @@ from strutils import startsWith, toLowerAscii, strip type MimeDB* = object - mimes: OrderedTableRef[string, string] + mimes: OrderedTable[string, string] const mimes* = { "123": "application/vnd.lotus-1-2-3", @@ -1904,7 +1904,7 @@ func newMimetypes*(): MimeDB = ## Creates a new Mimetypes database. The database will contain the most ## common mimetypes. {.cast(noSideEffect).}: - result.mimes = mimes.newOrderedTable() + result.mimes = mimes.toOrderedTable() func getMimetype*(mimedb: MimeDB, ext: string, default = "text/plain"): string = ## Gets mimetype which corresponds to `ext`. Returns `default` if `ext` |