Skip to content

Fix incorrect platform-specific Verifier documentation#57

Merged
complexspaces merged 2 commits into
mainfrom
docs-fixes
Jan 4, 2024
Merged

Fix incorrect platform-specific Verifier documentation#57
complexspaces merged 2 commits into
mainfrom
docs-fixes

Conversation

@complexspaces

@complexspaces complexspaces commented Jan 4, 2024

Copy link
Copy Markdown
Collaborator

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

@cpu cpu left a comment

Copy link
Copy Markdown
Member

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
@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