On the "safety" of escape_into.
Open
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 21
- Forks
- 6
- Avg merge
- 5h 26m
- Merged PRs (30d)
- 6
Description
I am talking about
pub fn escape_into(value: &str, dst: &mut Vec<u8>) {
This thing is pure unsafe semantically, a clear UB. IMO it should be deprecated and an alternative should be recommended:
pub unsafe fn escape_append(value: &str, dst: *mut u8, len: usize) -> usize { // or *mut u8
This would be
- Fair. One should not promise what he's not going to deliver.
- Performant and actually more handy.
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
The issue names only the escape_into entry point and no files or tests. Start by locating its implementation and reviewing the current API contract, then compare the proposed escape_append signatures; done requires a settled API and safety design before implementation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- performance
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100