You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Serde serialize Multihash in bytes representation ([#302](https://github.com/multiformats/rust-multihash/issues/302)) ([1023226](https://github.com/multiformats/rust-multihash/commit/10232266c01aa83190af62ad6aeebf63bb7a16c7))
16
+
17
+
18
+
### Bug Fixes
19
+
20
+
* avoid possible panic in error handling code ([#277](https://github.com/multiformats/rust-multihash/issues/277)) ([5dc1dfa](https://github.com/multiformats/rust-multihash/commit/5dc1dfac0235e63e9ad80572e6b73f8fcd301ec3))
21
+
* don't panic on non minimal varints ([#291](https://github.com/multiformats/rust-multihash/issues/291)) ([6ef6040](https://github.com/multiformats/rust-multihash/commit/6ef604012b84d5c15d4f3c66a28ead96afedf158)), closes [#282](https://github.com/multiformats/rust-multihash/issues/282)
22
+
* expose `MultihashDigest` trait in codetable ([#304](https://github.com/multiformats/rust-multihash/issues/304)) ([50b43cd](https://github.com/multiformats/rust-multihash/commit/50b43cdbba5492923ffb31bb197930d2f3e2cf14))
23
+
24
+
25
+
### Code Refactoring
26
+
27
+
* split crates into multiple to isolate breaking changes ([#272](https://github.com/multiformats/rust-multihash/issues/272)) ([954e523](https://github.com/multiformats/rust-multihash/commit/954e5233d273a2b7d682fd087178203628d131a4))
28
+
1
29
### Migrating
2
30
3
31
When upgrading to `v0.19`, consider the following:
4
32
5
-
-`Code` has moved to `multihash_codetable::Code`.
6
-
Either use that or define your own codetable using `multihash_derive`.
33
+
-`Code` has moved from `multihash::Code` to `multihash_codetable::Code`. It's strongly recommended to define your own code table using `multihash_derive`. Check the [custom codetable example](codetable/examples/custom_table.rs) on how to use it. For the simplest migration, use the `multihash_codetable::Code`.
34
+
35
+
**Before**
36
+
37
+
```rust
38
+
usemultihash::{Code, MultihashDigest};
39
+
40
+
fnmain() {
41
+
lethash=Code::Sha2_256.digest(b"hello, world!");
42
+
println!("{:?}", hash);
43
+
}
44
+
```
45
+
46
+
**After**
47
+
48
+
```rust
49
+
usemultihash_codetable::{Code, MultihashDigest};
50
+
51
+
fnmain() {
52
+
lethash=Code::Sha2_256.digest(b"hello, world!");
53
+
println!("{:?}", hash);
54
+
}
55
+
```
56
+
57
+
If you get compile errors, make sure you have the correct features enabled. In this case it would be the `sha2` and `digest` features.
7
58
8
59
-`multihash::Multihash` now requires the size of its internal buffer as a const-generic.
9
60
You can migrate your existing code by defining the following type-alias:
@@ -13,7 +64,33 @@ When upgrading to `v0.19`, consider the following:
13
64
```
14
65
15
66
- The `identity` hasher has been removed completely.
16
-
Check the [identity example](examples/identity.rs) on how to replicate the functionality.
0 commit comments