paritytech / paritytech/parity-scale-codec
Support `Compact<Option<T>>`
Open
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 287
- Forks
- 103
- Avg merge
- 6d 13h
- Merged PRs (30d)
- 1
Description
There is currently no easy way to compact encode a value that is wrapped in an option. We should add:
impl<T> {Encode, Decode} for Compact<Option<T>> where Compact<T>: {Encode, Decode} {
...
}
The compact encoding of the Option itself is unchanged from the non compact one: Prepending one byte to indicate none or some.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No file or test path is named. Locate the existing Compact Encode and Decode implementations and the Option encoding tests, then verify that Compact<Option> uses the existing option marker byte while delegating the value encoding to Compact.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100