Skip to content

Commit

Permalink
Fix rustdoc unresolved import error if libsystemd feature is disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
SpriteOvO committed May 28, 2024
1 parent f22d2f1 commit 8f46ec1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,10 @@ jobs:
run: |
cd spdlog
# The reason for allowing lint `unexpected_cfgs` not in `build.rs` or `Cargo.toml` but in CI is that we need to keep MSRV
cargo +nightly rustdoc --verbose -- -D warnings -A unexpected_cfgs -A rustdoc::broken-intra-doc-links
cargo +nightly rustdoc --all-features --verbose -- -D warnings -A unexpected_cfgs
cd ../spdlog-macros
cargo +nightly rustdoc --verbose -- -D warnings -A unexpected_cfgs -A rustdoc::broken-intra-doc-links
cargo +nightly rustdoc --all-features --verbose -- -D warnings -A unexpected_cfgs
check-msrv:
Expand Down
2 changes: 1 addition & 1 deletion spdlog/src/sink/journald_sink.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ impl Default for SyslogLevels {
}

fn journal_send(args: impl Iterator<Item = impl AsRef<str>>) -> StdResult<(), io::Error> {
#[cfg(target_os = "linux")] // https://github.com/rust-lang/rust/issues/97976
#[cfg(not(doc))] // https://github.com/rust-lang/rust/issues/97976
use libsystemd_sys::{const_iovec, journal as ffi};

let iovecs: Vec<_> = args.map(|a| unsafe { const_iovec::from_str(a) }).collect();
Expand Down

0 comments on commit 8f46ec1

Please sign in to comment.