Skip to content

Commit

Permalink
docs: Add feature flag info, test in CI (#186)
Browse files Browse the repository at this point in the history
  • Loading branch information
waywardmonkeys authored Nov 16, 2024
1 parent e965a35 commit 606fc25
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 2 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/check-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Check documentation

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

env:
CARGO_TERM_COLOR: always
RUSTDOCFLAGS: '--cfg docsrs -D warnings'

jobs:
# We test documentation using nightly to match docs.rs.
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2
- name: Install nightly Rust
run: rustup default nightly
- name: Check docs
run: cargo doc --workspace --no-deps --document-private-items
1 change: 1 addition & 0 deletions fidget/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,7 @@
//!
//! # Feature flags
#![doc = document_features::document_features!()]
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
#![warn(missing_docs)]

// Re-export everything from fidget::core into the top-level namespace
Expand Down
4 changes: 2 additions & 2 deletions fidget/src/render/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ pub struct ImageRenderConfig {
/// Tile sizes to use during evaluation.
///
/// You'll likely want to use
/// [`RenderHints::tile_sizes_2d`](crate::shape::RenderHints::tile_sizes_2d)
/// [`RenderHints::tile_sizes_2d`](crate::render::RenderHints::tile_sizes_2d)
/// to select this based on evaluator type.
pub tile_sizes: TileSizes,

Expand Down Expand Up @@ -130,7 +130,7 @@ pub struct VoxelRenderConfig {
/// Tile sizes to use during evaluation.
///
/// You'll likely want to use
/// [`RenderHints::tile_sizes_3d`](crate::shape::RenderHints::tile_sizes_3d)
/// [`RenderHints::tile_sizes_3d`](crate::render::RenderHints::tile_sizes_3d)
/// to select this based on evaluator type.
pub tile_sizes: TileSizes,

Expand Down

0 comments on commit 606fc25

Please sign in to comment.