Skip to content

Commit

Permalink
Upgrade to latest ssb-multiformats
Browse files Browse the repository at this point in the history
  • Loading branch information
pietgeursen committed Oct 15, 2020
1 parent 2aee4bd commit d6dbb60
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ serde_bytes = "0.11.3"
serde_cbor = "0.10.2"
buffered_offset_reader = "0.6.0"
bidir_iter = "0.2.1"
ssb-multiformats = "0.2.1"
ssb-multiformats = "0.4.0"

[dev-dependencies]
criterion = "0.3.0"
Expand Down
4 changes: 2 additions & 2 deletions src/go_offset_log.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use byteorder::{BigEndian, ReadBytesExt};
use serde_cbor::from_slice;
use serde_cbor::Value as CborValue;
use serde_json::{json, Value};
use ssb_multiformats::multihash::{Multihash, Target};
use ssb_multiformats::multihash::Multihash;
use std::fs::{File, OpenOptions};
use std::io;
use std::io::{Seek, SeekFrom};
Expand Down Expand Up @@ -47,7 +47,7 @@ impl<'a> GoMsgPackKey<'a> {
pub fn to_legacy_string(&self) -> String {
let mut arr = [0u8; 32];
arr.copy_from_slice(&self.hash[..32]);
let multi_hash = Multihash::from_sha256(arr, Target::Message);
let multi_hash = Multihash::Message(arr);
multi_hash.to_legacy_string()
}
}
Expand Down

0 comments on commit d6dbb60

Please # to comment.