Skip to content

Commit

Permalink
Merge pull request #72 from waywardmonkeys/fix-cargo-doc-warning
Browse files Browse the repository at this point in the history
Fix `rustdoc::redundant_explicit_links` lint
  • Loading branch information
dfrg authored Nov 7, 2024
2 parents 85a59ab + 00a9020 commit b90a9d6
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 1 deletion.
17 changes: 17 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,20 @@ jobs:
with:
components: miri
- run: cargo miri test

doc:
name: cargo doc
# NOTE: We don't have any platform specific docs in this workspace, so we only run on Ubuntu.
# If we get per-platform docs (win/macos/linux/wasm32/..) then doc jobs should match that.
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: install nightly toolchain
uses: dtolnay/rust-toolchain@nightly

# We test documentation using nightly to match docs.rs.
- name: cargo doc
run: cargo doc --workspace --all-features --no-deps --document-private-items
env:
RUSTDOCFLAGS: '--cfg docsrs -D warnings'
6 changes: 6 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ repository = "https://github.com/dfrg/swash"
homepage = "https://github.com/dfrg/swash"
readme = "README.md"

[package.metadata.docs.rs]
all-features = true
# There are no platform specific docs.
default-target = "x86_64-unknown-linux-gnu"
targets = []

[features]
default = ["std", "scale", "render"]

Expand Down
1 change: 1 addition & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ the respective modules.
#![allow(clippy::needless_lifetimes)]
#![allow(clippy::redundant_static_lifetimes)]
#![allow(clippy::too_many_arguments)]
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
#![cfg_attr(not(any(test, feature = "std")), no_std)]
extern crate alloc;

Expand Down
2 changes: 1 addition & 1 deletion src/scale/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -782,7 +782,7 @@ impl<'a> Render<'a> {
}

/// Specifies the target format for rasterizing an outline. Default is
/// [`Format::Alpha`](zeno::Format::Alpha).
/// [`Format::Alpha`].
pub fn format(&mut self, format: Format) -> &mut Self {
self.format = format;
self
Expand Down

0 comments on commit b90a9d6

Please sign in to comment.