Skip to content

Use non-optional functions for Data conversion #6952

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 29, 2023
Merged

Use non-optional functions for Data conversion #6952

merged 1 commit into from
Sep 29, 2023

Conversation

zunda-pixel
Copy link
Contributor

Motivation:

change to Non Optional Function from Optional Function

Result

  • String(data:encoding)? -> String(decoding:as)
  • String.data(using)? -> Data(String.utf8)
  • remove extra Error

String(data:encoding)? -> String(decoding:as)
String.data(using)? -> Data(String.utf8)
@MaxDesiatov
Copy link
Contributor

@swift-ci test

@MaxDesiatov
Copy link
Contributor

@swift-ci test macos

@neonichu
Copy link
Contributor

cc @yim-lee

@MaxDesiatov MaxDesiatov changed the title replace to Non Optional Function(UTF8) Use non-optional function for Data conversion Sep 27, 2023
@MaxDesiatov MaxDesiatov changed the title Use non-optional function for Data conversion Use non-optional functions for Data conversion Sep 27, 2023
Copy link
Contributor

@MaxDesiatov MaxDesiatov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@neonichu neonichu merged commit 8e811d7 into swiftlang:main Sep 29, 2023
@zunda-pixel zunda-pixel deleted the fix-utf8-decode-encode branch September 30, 2023 04:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants