From ba86028aaae13accddd61558dc7e72011778a5a5 Mon Sep 17 00:00:00 2001 From: Daniel Rainer Date: Fri, 30 May 2025 21:32:14 +0200 Subject: [PATCH 1/2] Fix rustdoc warning --- src/screen.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/screen.rs b/src/screen.rs index 680bdbad3..87a77f0b3 100644 --- a/src/screen.rs +++ b/src/screen.rs @@ -1561,7 +1561,7 @@ pub fn escape_code_length(code: &wstr) -> Option { /// Midnight Commander tries to extract the last line of the prompt, and does so in a way that is /// broken if you do '\r' after it like we normally do. -/// See https://midnight-commander.org/ticket/4258. +/// See . pub fn screen_set_midnight_commander_hack() { MIDNIGHT_COMMANDER_HACK.store(true) } From 75d243faaaebeb67fcddd17e6b3bb37d1424a865 Mon Sep 17 00:00:00 2001 From: Daniel Rainer Date: Fri, 30 May 2025 21:26:45 +0200 Subject: [PATCH 2/2] Check rustdocs in CI Setting `RUSTDOCFLAGS='-D warnings'` is needed to fail on warnings. For `cargo test --doc` no equivalent option seems to exist. See https://github.com/rust-lang/cargo/issues/14802. --- .github/workflows/rust_checks.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/rust_checks.yml b/.github/workflows/rust_checks.yml index c5bdbb917..26b2f900d 100644 --- a/.github/workflows/rust_checks.yml +++ b/.github/workflows/rust_checks.yml @@ -32,6 +32,19 @@ jobs: # into automatic CI failure day, so we don't do that. run: cargo clippy --workspace --all-targets + rustdoc: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - uses: dtolnay/rust-toolchain@stable + - name: cargo doc + run: | + RUSTDOCFLAGS='-D warnings' cargo doc --workspace --all + - name: cargo doctest + run: | + cargo test --doc --workspace --all + # Disabling for now because it also checks "advisories", # making CI fail for reasons unrelated to the patch # cargo-deny: