Skip to content
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

Minimal String type #4716

Merged
merged 2 commits into from
Jun 30, 2023
Merged

Minimal String type #4716

merged 2 commits into from
Jun 30, 2023

Conversation

IGI-111
Copy link
Contributor

@IGI-111 IGI-111 commented Jun 28, 2023

Description

Create a minimal, forward compatible unicode string type that only accepts ASCII input and doesn't provide mutation of codepoints.

This should provide Sway-Standards with a proper black box type to use while still giving us a good platform to later implement a proper, char based unicode string without compatibility issues.

Follow-up from #4710

Checklist

  • I have linked to any relevant issues.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have updated the documentation where relevant (API docs, the reference, and the Sway book).
  • I have added tests that prove my fix is effective or that my feature works.
  • I have added (or requested a maintainer to add) the necessary Breaking* or New Feature labels where relevant.
  • I have done my best to ensure that my PR adheres to the Fuel Labs Code Review Standards.
  • I have requested a review from the relevant team or maintainers.

@IGI-111 IGI-111 added the lib: std Standard library label Jun 28, 2023
@IGI-111 IGI-111 self-assigned this Jun 28, 2023
@IGI-111 IGI-111 requested review from a team and bitzoic June 29, 2023 17:11
@IGI-111 IGI-111 marked this pull request as ready for review June 29, 2023 17:11
JoshuaBatty
JoshuaBatty previously approved these changes Jun 30, 2023
Copy link
Member

@JoshuaBatty JoshuaBatty left a comment

Choose a reason for hiding this comment

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

Nice.

@JoshuaBatty JoshuaBatty requested a review from a team June 30, 2023 03:32
Copy link
Contributor

@tritao tritao left a comment

Choose a reason for hiding this comment

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

Looks good, just some minor nits.

sway-lib-std/src/string.sw Outdated Show resolved Hide resolved
sway-lib-std/src/string.sw Outdated Show resolved Hide resolved
sway-lib-std/src/string.sw Outdated Show resolved Hide resolved
bitzoic
bitzoic previously approved these changes Jun 30, 2023
Copy link
Member

@bitzoic bitzoic left a comment

Choose a reason for hiding this comment

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

This makes a lot of sense over #4710

sway-lib-std/src/string.sw Outdated Show resolved Hide resolved
Create a minimal, forward compatible unicode string type that only
accepts ASCII input and doesn't provide mutation of codepoints.

This should provide Sway-Standards with a proper black box type to use
while still giving us a good platform to later implement a proper, `char`
based unicode string without compatibility issues.
@IGI-111 IGI-111 enabled auto-merge (squash) June 30, 2023 12:06
@IGI-111 IGI-111 merged commit 161d889 into master Jun 30, 2023
24 checks passed
@IGI-111 IGI-111 deleted the IGI-111/ascii-string branch June 30, 2023 12:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lib: std Standard library
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants