AK+Swift: Remove Foundation.Data footgun for AK.StringView

Also give the Swift.String init routines an explict label when
constructing from AK String types, as this caused issues in a later
commit to have them both with `_ data`.
This commit is contained in:
Andrew Kaster 2024-08-28 21:17:25 -06:00 committed by Andreas Kling
commit a3e6856b56
Notes: github-actions[bot] 2024-08-29 04:32:23 +00:00
3 changed files with 12 additions and 13 deletions

View file

@ -13,7 +13,7 @@ extension Swift.String {
public init?(decoding: AK.StringView, as: AK.StringView) {
let maybe_decoded = Web.HTML.decode_to_utf8(decoding, `as`)
if maybe_decoded.hasValue {
self.init(maybe_decoded.value!)
self.init(akString: maybe_decoded.value!)
} else {
return nil
}