Skip to content

Commit

Permalink
chore: update Readme (#115)
Browse files Browse the repository at this point in the history
update example import
  • Loading branch information
boneyard93501 authored Apr 19, 2021
1 parent 9b73c8d commit 5f4398e
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,12 @@
> [multihash](https://github.com/multiformats/multihash) implementation in Rust.
## Table of Contents

- [Install](#install)
- [Usage](#usage)
- [Supported Hash Types](#supported-hash-types)
- [Maintainers](#maintainers)
- [Contribute](#contribute)
- [License](#license)
- [Install](#install)
- [Usage](#usage)
- [Supported Hash Types](#supported-hash-types)
- [Maintainers](#maintainers)
- [Contribute](#contribute)
- [License](#license)

## Install

Expand All @@ -37,7 +36,7 @@ Then run `cargo build`.
## Usage

```rust
use multihash::{Code, MultihashCode};
use multihash::{Code, MultihashDigest};

fn main() {
let hash = Code::Sha2_256.digest(b"my hash");
Expand All @@ -51,7 +50,7 @@ You can derive your own application specific code table:

```rust
use multihash::derive::Multihash;
use multihash::{MultihashCode, U32, U64};
use multihash::{MultihashDigest, U32, U64};

#[derive(Clone, Copy, Debug, Eq, Multihash, PartialEq)]
#[mh(alloc_size = U64)]
Expand Down

0 comments on commit 5f4398e

Please sign in to comment.