Skip to content

fix: documentation linked to private items - #327

Merged
Kriskras99 merged 1 commit into
apache:mainfrom
Kriskras99:fix/private_intra_doc_links
Oct 29, 2025
Merged

Kriskras99 merged 1 commit into
apache:mainfrom
Kriskras99:fix/private_intra_doc_links

Conversation

@Kriskras99

Copy link
Copy Markdown
Contributor

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 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.
Comment thread avro/src/lib.rs Resolved
Comment thread avro/src/lib.rs Resolved
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
Kriskras99 force-pushed the fix/private_intra_doc_links branch from 00400ce to bc1bce7 Compare October 29, 2025 08:56
@Kriskras99
Kriskras99 merged commit 0f87fd5 into apache:main Oct 29, 2025
@Kriskras99
Kriskras99 deleted the fix/private_intra_doc_links branch October 29, 2025 09:05
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.

2 participants