[rust] [rust-server] More abstract functions including integer fitting#13503
Merged
wing328 merged 2 commits intoOpenAPITools:masterfrom Oct 6, 2022
Merged
[rust] [rust-server] More abstract functions including integer fitting#13503wing328 merged 2 commits intoOpenAPITools:masterfrom
wing328 merged 2 commits intoOpenAPITools:masterfrom
Conversation
d3c22c4 to
6b04e27
Compare
6b04e27 to
d67d651
Compare
Contributor
Author
|
@wing328 Please review when you have time :) |
wing328
reviewed
Oct 4, 2022
.../openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractRustCodegen.java
Show resolved
Hide resolved
wing328
reviewed
Oct 4, 2022
.../openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractRustCodegen.java
Show resolved
Hide resolved
Member
|
Reviewed with 2 minor suggestions. Generally I'm ok with this change. |
Member
|
circleci failure already fixed in master. |
jayandran-Sampath
pushed a commit
to jayandran-Sampath/openapi-generator
that referenced
this pull request
Oct 6, 2022
OpenAPITools#13503) * [rust] [rust-server] Abstract Rust Integer fitting * Add docstrings
Member
|
@jacob-pro can you please PM me via Slack when you've time? Thanks. https://join.slack.com/t/openapi-generator/shared_invite/zt-12jxxd7p2-XUeQM~4pzsU9x~eGLQqX2g |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a follow up to my previous PR (#13231) which moves more functions into the
AbstractRustCodgen.Three simple functions (
generatorLanguage,escapeQuotationMark,escapeUnsafeCharacters) are identical and have just been cut-paste / de-duplicated.The rest of the changes relate to integer fitting. The new integer fitting code should be a lot more straightforward to understand and more consistent. It also has a much more extensive set of test cases that check the key boundary conditions.
This is however a very slightly breaking change, because there are some strange edge cases where the integer handling currently works differently in
rustvsrust-server, which have now been smoothed over. Again like the previous PR I have tried to maintain a compromise making the minimum changes to existing behaviour, but also trying to keep the code sane & consistent.cc: @frol @farcaller @richardwhiuk @paladinzh