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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

checker: extend byte deprecation warnings to return types #19668

Merged
merged 1 commit into from Oct 29, 2023

Conversation

ttytm
Copy link
Member

@ttytm ttytm commented Oct 26, 2023

馃 Generated by Copilot at 1cde7b0

Refactored string and json modules to use u8 instead of byte and added a deprecation warning for byte. This is part of a transition to remove the byte alias and use u8 consistently.

馃 Generated by Copilot at 1cde7b0

  • Change the return type of string.at from byte to u8 and move the unsafe block inside the return statement (link, link)
  • Move decode_byte from vlib/json/json_primitives.v to vlib/builtin/string.v and use u8 instead of byte (link)
  • Add a warning to the checker for using byte instead of u8 (link)

Copy link
Member

@spytheman spytheman left a comment

Choose a reason for hiding this comment

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

Good work.

@spytheman spytheman merged commit 1e578b1 into vlang:master Oct 29, 2023
54 checks passed
@ttytm ttytm deleted the checker/fn-return-byte-dep-warn branch November 1, 2023 19:47
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.

None yet

2 participants