From ca6c6a5ca0213d263c2fa7c4e2392f52bfca6e8f Mon Sep 17 00:00:00 2001 From: Yuri Kotov Date: Mon, 13 Feb 2023 20:19:51 +0500 Subject: [PATCH] Add doc-check to CI with fix warnings in docs, but broken-intra-doc-links (#743) --- .github/workflows/rust.yml | 19 +++++++++++++++++++ src/db_options.rs | 8 ++++---- 2 files changed, 23 insertions(+), 4 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index cc574a8..3362c52 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -24,6 +24,25 @@ jobs: command: fmt args: --all -- --check + doc-check: + name: Rustdoc-check + runs-on: ubuntu-latest + steps: + - name: Checkout sources + uses: actions/checkout@v2 + - name: Install rust + uses: actions-rs/toolchain@v1 + with: + toolchain: ${{ env.RUST_VERSION }} + components: rust-docs + profile: minimal + override: true + - name: Run cargo rustdoc + uses: actions-rs/cargo@v1 + with: + command: rustdoc + args: -- -D warnings -A rustdoc::broken-intra-doc-links + clippy: name: Clippy runs-on: ubuntu-latest diff --git a/src/db_options.rs b/src/db_options.rs index 463f564..186f3a3 100644 --- a/src/db_options.rs +++ b/src/db_options.rs @@ -145,8 +145,6 @@ impl BlockBasedOptionsMustOutliveDB { /// opts.set_level_zero_stop_writes_trigger(2000); /// opts.set_level_zero_slowdown_writes_trigger(0); /// opts.set_compaction_style(DBCompactionStyle::Universal); -/// opts.set_max_background_compactions(4); -/// opts.set_max_background_flushes(4); /// opts.set_disable_auto_compactions(true); /// /// DB::open(&opts, path).unwrap() @@ -1708,10 +1706,10 @@ impl Options { /// # Examples /// /// ``` - /// #[allow(deprecated)] /// use rocksdb::Options; /// /// let mut opts = Options::default(); + /// #[allow(deprecated)] /// opts.set_allow_os_buffer(false); /// ``` #[deprecated( @@ -2134,6 +2132,7 @@ impl Options { /// use rocksdb::Options; /// /// let mut opts = Options::default(); + /// #[allow(deprecated)] /// opts.set_max_background_compactions(2); /// ``` #[deprecated( @@ -2169,6 +2168,7 @@ impl Options { /// use rocksdb::Options; /// /// let mut opts = Options::default(); + /// #[allow(deprecated)] /// opts.set_max_background_flushes(2); /// ``` #[deprecated( @@ -2999,7 +2999,7 @@ impl Options { /// Enable the use of key-value separation. /// - /// More details can be found here: http://rocksdb.org/blog/2021/05/26/integrated-blob-db.html. + /// More details can be found here: [Integrated BlobDB](http://rocksdb.org/blog/2021/05/26/integrated-blob-db.html). /// /// Default: false (disable) ///