Repository navigation
fix: documentation linked to private items - #327
Merged
Merged
Conversation
Kriskras99
referenced
this pull request
Oct 29, 2025
This refactor splits a unit test into two integration tests as it's no longer possible to overwrite `SERDE_HUMAN_READABLE` after it has been set. By splitting it into two integration tests, they don't share global state and can thus modify it for the test. I've also removed the unit tests that test that the `Serializer`/ `Deserializer` correctly use `SERDE_HUMAN_READABLE` for their `is_human_readable` implementation as these structs are not accessible from a integration test. I've kept the half of the tests that test for `SERDE_HUMAN_READABLE == true`. If this implementation is ever changed it will also affect the integration tests so it's still being tested.
martin-g
approved these changes
Oct 29, 2025
I've made the items public, by making the `util` module public. Any items in there that should not be public have been marked `pub(crate)`. As `set_serde_human_readable` and `max_allocation_bytes` are now also available through the `util` path, I've deprecated them in the root of the crate. As you can't deprecate a re-export, I've done this by wrapping them in a function and deprecating that function. I've also updated the documentation of `set_serde_human_readable` and `max_allocation_bytes` to explain the return value and that it can be different than the user expects.
Kriskras99
force-pushed
the
fix/private_intra_doc_links
branch
from
October 29, 2025 08:56
00400ce to
bc1bce7
Compare
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.
I've made the items public, by making the
utilmodule public. Any items in there that should not be public have been markedpub(crate).As
set_serde_human_readableandmax_allocation_bytesare now also available through theutilpath, I've deprecated them in the root of the crate. As you can't deprecate a re-export, I've done this by wrapping them in a function and deprecating that function.I've also updated the documentation of
set_serde_human_readableandmax_allocation_bytesto explain the return value and that it can be different than the user expects.