Skip to content

Commit

Permalink
For toOptionalStrings which is used for credentials, don't replace it…
Browse files Browse the repository at this point in the history
… with ?
  • Loading branch information
waahm7 committed Jan 17, 2024
1 parent 8b0fb27 commit 083ac44
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Source/AwsCommonRuntimeKit/crt/Utilities.swift
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ extension aws_byte_cursor {
func toOptionalString() -> String? {
if self.len == 0 { return nil }
let data = Data(bytesNoCopy: self.ptr, count: self.len, deallocator: .none)
return String(decoding: data, as: UTF8.self)
return String(data: data, encoding: .utf8)
}
}

Expand Down

0 comments on commit 083ac44

Please sign in to comment.