Commit 40e7475
docs(templated_uri): clarify Escaped invariant and percent_encode slice-boundary safety
Address review feedback on two doc comments:
- `Escaped<T>` said the wrapped `Display` output contains "no RFC 6570 reserved
characters", but the escaped form intentionally includes well-formed `%XX`
sequences (and thus `%`). Reword to "no *unescaped* reserved characters".
- `percent_encode` said "all slice boundaries fall on unreserved ASCII bytes",
which is imprecise for `s[..first]` (can start at index 0 or a multi-byte code
point). State the real property: every `&str` slice index is a UTF-8 character
boundary because unreserved bytes are all single-byte ASCII.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 10499452-0720-40ab-9e9f-506e1fd3ccaf1 parent 1b2dbbb commit 40e7475
1 file changed
Lines changed: 8 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
18 | | - | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| |||
272 | 273 | | |
273 | 274 | | |
274 | 275 | | |
275 | | - | |
276 | | - | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
277 | 281 | | |
278 | 282 | | |
279 | 283 | | |
| |||
0 commit comments