`escape_byte_string` could accept `B: IntoIterator<Item=u8>`
Open
enhancement
good first issue
- Dominant language
- Rust
- Stars
- 52
- Forks
- 25
- Avg merge
- 21h 53m
- Merged PRs (30d)
- 2
Description
If we change the signature from
```rust
pub fn escape_byte_string(bytes: B) -> String
where
B: AsRef<[u8]>,
```
to
```rust
pub fn escape_byte_string(bytes: B) -> String
where
B: IntoIterator,
```
then we can pass more types to the function, e.g. `VecDeque`.
The implementation would not change much because we create an iterator anyway. Current implementation:
```rust
let bytes = bytes.as_ref();
bytes
.iter()
//...
```
Contributor guide
Assessment
This issue has not been assessed yet.