Skip to content
This repository was archived by the owner on Feb 6, 2024. It is now read-only.

Commit 44f098b

Browse files
committed
Update bytecursor, comments
1 parent 206d7a2 commit 44f098b

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

Cargo.lock

+3-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+3-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ readme = "README.md"
1111
repository = "https://github.com/yatima-inc/sp-multihash"
1212
documentation = "https://docs.rs/sp-multihash"
1313
description = "Multihash library for `no_std` use within Substrate"
14-
keywords = ["multihash", "no-std"]
14+
keywords = ["multihash", "no_std"]
15+
categories = ["no-std"]
1516

1617
[features]
1718
default = ["derive", "multihash-impl", "secure-hashes"]
@@ -50,7 +51,7 @@ sha-3 = { version = "0.9.0", default-features = false, optional = true, package
5051
strobe-rs = { version = "0.6.2", default-features = false, optional = true }
5152

5253
sp-std = {version = "3", default-features = false }
53-
bytecursor = { git = "https://github.com/yatima-inc/bytecursor", branch = "main" }
54+
bytecursor = "0.1.2"
5455

5556
[dev-dependencies]
5657
criterion = "0.3.3"

src/multihash.rs

+2
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,8 @@ pub fn write_multihash(
275275
Ok(())
276276
}
277277

278+
/// Reads 64 bits from a byte array into a u64 starting at the current Bytecursor position
279+
/// Adapted from unsigned-varint's read_u64 generated function
278280
pub fn read_u64(r: &mut ByteCursor) -> Result<u64, Error> {
279281
let mut b = varint_encode::u64_buffer();
280282
for i in 0..b.len() {

0 commit comments

Comments
 (0)