Skip to content

Commit 96fa2e1

Browse files
committed
Fix rustdoc unresolved import error if libsystemd feature is disabled
1 parent eaa8f57 commit 96fa2e1

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

.github/workflows/ci.yml

+2
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,10 @@ jobs:
125125
- name: Run rustdoc
126126
run: |
127127
cd spdlog
128+
cargo +nightly rustdoc --verbose -- -D warnings -A unexpected_cfgs -A rustdoc::broken-intra-doc-links
128129
cargo +nightly rustdoc --all-features --verbose -- -D warnings -A unexpected_cfgs
129130
cd ../spdlog-macros
131+
cargo +nightly rustdoc --verbose -- -D warnings -A unexpected_cfgs -A rustdoc::broken-intra-doc-links
130132
cargo +nightly rustdoc --all-features --verbose -- -D warnings -A unexpected_cfgs
131133
132134
check-msrv:

spdlog/src/sink/journald_sink.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ impl Default for SyslogLevels {
4747
}
4848

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

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

0 commit comments

Comments
 (0)