Merge pull request #3 from alexheretic/nicer-readme

Add crates, doc badge & rust hightlighting to readme
This commit is contained in:
Nick Cameron 2018-06-24 16:03:32 +12:00 committed by GitHub
commit d110ab3e47
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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);
```