diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-06-29 16:39:51 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2020-06-29 16:39:51 +0100 |
commit | 4da0a78c4e65e4abc5ca4ae1ed879e4e86737c9e (patch) | |
tree | 2bbefd6c7b7ad012a1e26f066ed87d716a484387 /docs/dev | |
parent | 32ee06032785ea1792144f7263cbce93a4de467b (diff) | |
parent | 95d67ec40174ec1c344ab39eee414d7a41a36af0 (diff) |
Merge #5126
5126: Use more of FxHash* r=matklad a=lnicola
```
-rwxr-xr-x 1 me me 37917528 Jun 29 17:26 /home/me/.cargo/bin/rust-analyzer
-rwxr-xr-x 1 me me 37904056 Jun 29 18:14 /home/me/.cargo/bin/rust-analyzer
```
Saved 13.5 KB there :-).
Co-authored-by: Laurențiu Nicola <[email protected]>
Diffstat (limited to 'docs/dev')
-rw-r--r-- | docs/dev/README.md | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/docs/dev/README.md b/docs/dev/README.md index 11dc5261b..6b6824ded 100644 --- a/docs/dev/README.md +++ b/docs/dev/README.md | |||
@@ -254,6 +254,11 @@ The default name is a lowercased name of the type: `global_state: GlobalState`. | |||
254 | Avoid ad-hoc acronyms and contractions, but use the ones that exist consistently (`db`, `ctx`, `acc`). | 254 | Avoid ad-hoc acronyms and contractions, but use the ones that exist consistently (`db`, `ctx`, `acc`). |
255 | The default name for "result of the function" local variable is `res`. | 255 | The default name for "result of the function" local variable is `res`. |
256 | 256 | ||
257 | ## Collection types | ||
258 | |||
259 | We prefer `rustc_hash::FxHashMap` and `rustc_hash::FxHashSet` instead of the ones in `std::collections`. | ||
260 | They use a hasher that's slightly faster and using them consistently will reduce code size by some small amount. | ||
261 | |||
257 | ## Preconditions | 262 | ## Preconditions |
258 | 263 | ||
259 | Function preconditions should generally be expressed in types and provided by the caller (rather than checked by callee): | 264 | Function preconditions should generally be expressed in types and provided by the caller (rather than checked by callee): |