File tree 1 file changed +4
-3
lines changed
1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -532,7 +532,7 @@ struct StringMap(T, U = uint)
532
532
/+ +
533
533
Complexity: `O(log(s))`, where `s` is the number of the keys with the same length as the input key.
534
534
+/
535
- ref inout (T) opIndex ()(scope const (char )[] key) @trusted pure inout // @nogc
535
+ ref inout (T) opIndex ()(scope const (char )[] key) @trusted pure inout nothrow @nogc
536
536
{
537
537
size_t index;
538
538
if (implementation && implementation.findIndex(key, index))
@@ -542,8 +542,9 @@ struct StringMap(T, U = uint)
542
542
assert (index < length);
543
543
return implementation._values[index];
544
544
}
545
- import mir.exception: MirException;
546
- throw new MirException(" No member: " , key);
545
+ import core.exception : onRangeError;
546
+ onRangeError();
547
+ return implementation._values[0 ]; // TODO: remove when onRangeError is noreturn
547
548
}
548
549
549
550
version (mir_test) static if (is (T == int ))
You can’t perform that action at this time.
0 commit comments