mirror of
https://gitee.com/openharmony/third_party_rust_rustc-hash
synced 2024-11-23 07:49:54 +00:00
Merge pull request #3 from alexheretic/nicer-readme
Add crates, doc badge & rust hightlighting to readme
This commit is contained in:
commit
d110ab3e47
@ -1,5 +1,8 @@
|
||||
# rustc-hash
|
||||
|
||||
[![crates.io](https://img.shields.io/crates/v/rustc-hash.svg)](https://crates.io/crates/rustc-hash)
|
||||
[![Documentation](https://docs.rs/rustc-hash/badge.svg)](https://docs.rs/rustc-hash)
|
||||
|
||||
A speedy hash algorithm used within rustc. The hashmap in liballoc by
|
||||
default uses SipHash which isn't quite as speedy as we want. In the
|
||||
compiler we're not really worried about DOS attempts, so we use a fast
|
||||
@ -15,7 +18,8 @@ works on up to 8 bytes at a time.
|
||||
|
||||
## Usage
|
||||
|
||||
```
|
||||
```rust
|
||||
use rustc_hash::FxHashMap;
|
||||
let map: FxHashMap<u32, u32> = FxHashMap::default();
|
||||
map.insert(22, 44);
|
||||
```
|
||||
|
Loading…
Reference in New Issue
Block a user