refactor(uri): make formDecoded, formEncoded and percentDecoded methods and remove the functions #187
Loading…
Reference in a new issue
No description provided.
Delete branch "loop/179-uri-methods"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #179. Part of #146.
Task: slice of #146 for
std/uri: lead with methods for form and percent coding, remove the free functions (scope update on #146: no wrappers, nodeprecated).What:
String.formDecoded(),List<(String, String)>.formEncoded()andString.percentDecoded()are declared next to their bodies inform.trbandcharacters.trband re-exported fromstd/uriwithpublic use String.formDecoded, List.formEncoded/String.percentDecoded(pattern ofList.plainTextinstd/markdown, so #182 is not hit). The free functions are removed; callers inuri.trb,template.trbandtests/bridges.test.trbuse the methods and import from the declaring file.route,percentDecodedBytesand the other helpers stay free.docs/standard-library/uri.md,docs/design/URI.mdand the regenerated skill reference lead with the methods. No seed change, no compiler change.Test:
bridges.test.trbrewritten to the method spelling on the existing vectors. Gates run in forge CI only;pdisc checkclean locally.f27ef7b0cf649f1f5a4dApproved at head
649f1f5.bridges.test.trbmoved to the method spelling on the existing vectors (the empty-list case gets a typednone); no logic changed. CI green on this exact head (bootstrap linux-x64, tier A, gates, pdisc).text/pairsbecomingself;public use String.formDecoded, List.formEncodedandString.percentDecodedfollow theString.base64Decoded/List.hexEncodedpattern already used in std. A repo-wide grep finds no remaining caller of the removed free functions (thepercentDecodedinstd/yaml/src/scanner.trbis that module's own private helper).deprecated);route,percentDecodedBytesand the other helpers stay free; no seed or compiler change.Non-blocking:
docs/standard-library/uri.mdand the skill copy (around thesegments()paragraph and the "Forms and escapes" paragraph) now have short, ragged line breaks ("one:" / "Standard's parser ... a space,"); a reflow would read better.