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

Fix incorrect platform-specific Verifier documentation #57

Merged
merged 2 commits into from
Jan 4, 2024

Conversation

complexspaces
Copy link
Collaborator

@complexspaces complexspaces commented Jan 4, 2024

This PR fixes the incorrect documentation on docs.rs pointed out in #56. The root cause of the problem was that when I originally wrote the Android documentation parts, I used the doc_auto_cfg feature instead of the doc_cfg by mistake. The former is too eager and assumes that anything with a #[cfg()] gate is only available under the gated conditions.

Instead of trying to get what we want with doc_auto_cfg, and especially since we only have one item that needs special documentation treatment, I've instead switched to use doc_cfg "manually". This approach was partially inspired by how Tokio generates their platform-specific documentation.

Documentation generated from a Windows system:
image

Documentation generated on a macOS system:
image

Finally, I fixed a broken doc warning in the README when referencing the new_with_extra_roots function. Since this function only exists on Linux right now, documentation built on Windows and macOS won't make that symbol available. I've chosen to link to docs.rs instead for that function at least until the other platforms gain that function too.

Closes #56

Copy link
Member

@cpu cpu left a comment

Choose a reason for hiding this comment

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

Thank you for figuring this out! 🏆

@complexspaces complexspaces merged commit abb3710 into main Jan 4, 2024
13 checks passed
@complexspaces complexspaces deleted the docs-fixes branch January 4, 2024 23:33
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.

Fix Verifier struct required feature flag rendering in docs.rs
2 participants