-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This effectively just results in a null pointer, but it's cast to be whatever generic value `T` it's required to be. This can be dangerous of course and requires additional checks, but is useful in cases where performance is important (like with `MapEntry<K, V>[]` in the `Map` type); this approach can be leveraged instead of using `Option<T>`. It's much less ergonomic and type-safe, but it doesn't result in an extra layer of allocation and pointer-indirection.
- Loading branch information
Showing
2 changed files
with
20 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters