ipld / ipld/libipld

make Block cheaply cloneable

Open
#146 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
150
Forks
41
PR merge metrics
No merged PRs in 30d

Description

Since Block appears in APIs over multiple crates (mostly as `&Block`) and it doesn’t offer mutation methods, it would be reasonable to assume that an implementation of a consumer should want to hold on to the bytes it got — which today requires making a copy. The only adversely affected method would be `Block::into_inner()`, which probably would become less useful by such a change, as moving between Arc and Vec always requires an allocation.

What do you think?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.