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

Rust: Rename QUIC_ERROR to QUIC_STATUS #4765

Conversation

youyuanwu
Copy link
Contributor

Description

QUIC_ERROR was used in generated code originally because QUIC_STATUS is already occupied as a c macro type. Many msquic struct has the fields "status: QUIC_ERROR" and "error: u62", so this is confusing as why error field is not QUIC_ERROR?

This PR replaces QUIC_ERROR with the ideal name QUIC_STATUS to align perfectly with the C code. The wrapper.hpp gets a bit ugly but it produces the correct generated rust code.

Testing

Existing error code tests are changed to accommodate this rename.

Documentation

NA

@youyuanwu youyuanwu marked this pull request as ready for review January 27, 2025 20:15
@youyuanwu youyuanwu requested a review from a team as a code owner January 27, 2025 20:15
@nibanks nibanks added the Language: Rust Related to the Rust interop layer label Jan 27, 2025
@nibanks nibanks merged commit 71ae53b into microsoft:main Jan 29, 2025
476 of 487 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Language: Rust Related to the Rust interop layer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants