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 e82603d commit 1fd0028
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 @@ -125,8 +125,10 @@ jobs:
- name: Run rustdoc
run: |
cd spdlog
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 1fd0028

Please sign in to comment.