RustCrypto / RustCrypto/formats
der: use Cow for *Ref types
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 338
- Forks
- 188
- Avg merge
- 4d 6h
- Merged PRs (30d)
- 15
Description
Following https://github.com/RustCrypto/formats/pull/1778#issuecomment-2840198645,
we need to investigate why Cow<*Ref> does not work.
One major issue is that Clone is implemented on Ref types.
https://github.com/RustCrypto/formats/blob/217b6eff7bf1b15d4fea21a3a186c2faee4a4344/der/src/asn1/ia5_string.rs#L37-L40
which collides with (if i remember correctly):
https://doc.rust-lang.org/std/borrow/trait.ToOwned.html#impl-ToOwned-for-T
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
Start with the linked DER pull-request discussion and the Clone implementation in der/src/asn1/ia5_string.rs, then review Rust's ToOwned implementation for T. Reproduce the reported Cow<*Ref> conflict and inspect whether Clone on the Ref types is involved. Done means the incompatibility is understood and a concrete approach for using Cow with the Ref types is established.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cryptography
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100