about summary refs log tree commit diff stats
path: root/src/config/mimetypes.nim
diff options
context:
space:
mode:
Diffstat (limited to 'src/config/mimetypes.nim')
-rw-r--r--src/config/mimetypes.nim6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/config/mimetypes.nim b/src/config/mimetypes.nim
index 542bc267..e8a0fd07 100644
--- a/src/config/mimetypes.nim
+++ b/src/config/mimetypes.nim
@@ -4,7 +4,11 @@ import std/tables
 import utils/twtstr
 
 # extension -> type
-type MimeTypes* = Table[string, string]
+type MimeTypes* = distinct Table[string, string]
+
+proc `[]`*(mimeTypes: MimeTypes; k: string): string {.borrow.}
+proc contains*(mimeTypes: MimeTypes; k: string): bool {.borrow.}
+proc hasKeyOrPut*(mimeTypes: var MimeTypes; k, v: string): bool {.borrow.}
 
 # Add mime types found in stream to mimeTypes.
 # No error handling for now.