diff options
author | bptato <nincsnevem662@gmail.com> | 2023-08-13 19:41:17 +0200 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2023-08-13 19:41:17 +0200 |
commit | cbd6af4665052e12f7f9804942df8f435fb0929c (patch) | |
tree | 43b2eca1b1b30847366f90bc728e9fb6d59d98a6 | |
parent | 069685478c6bd8c38723b10158464c33ecdfc9c7 (diff) | |
download | chawan-cbd6af4665052e12f7f9804942df8f435fb0929c.tar.gz |
mimetypes: small optimization
-rw-r--r-- | src/config/mimetypes.nim | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/config/mimetypes.nim b/src/config/mimetypes.nim index 2c2bcc50..2133d863 100644 --- a/src/config/mimetypes.nim +++ b/src/config/mimetypes.nim @@ -29,8 +29,7 @@ proc parseMimeTypes*(mimeTypes: var MimeTypes, stream: Stream) = ext &= line[i].tolower() inc i if ext == "": continue - if ext notin mimeTypes: - mimeTypes[ext] = t + discard mimeTypes.hasKeyOrPut(ext, t) stream.close() proc parseMimeTypes*(stream: Stream): MimeTypes = |