From 9157df0c6f998925b28383a1ebcfd219ce299c01 Mon Sep 17 00:00:00 2001 From: Yuri Kotov Date: Tue, 14 Feb 2023 13:34:56 +0500 Subject: [PATCH] Fix rustdoc::broken-intra-doc-links errors (#744) --- .github/workflows/rust.yml | 2 +- src/db_options.rs | 8 ++++---- src/ffi_util.rs | 10 +++++----- src/write_batch.rs | 5 ++--- 4 files changed, 12 insertions(+), 13 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 3362c52..25ad816 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -41,7 +41,7 @@ jobs: uses: actions-rs/cargo@v1 with: command: rustdoc - args: -- -D warnings -A rustdoc::broken-intra-doc-links + args: -- -D warnings clippy: name: Clippy diff --git a/src/db_options.rs b/src/db_options.rs index 186f3a3..fa3c9a4 100644 --- a/src/db_options.rs +++ b/src/db_options.rs @@ -1036,8 +1036,8 @@ impl Options { /// /// Note that to actually unable bottom-most compression configuration after /// setting the compression type it needs to be enabled by calling - /// [`set_bottommost_compression_options`] or - /// [`set_bottommost_zstd_max_train_bytes`] method with `enabled` argument + /// [`set_bottommost_compression_options`](#method.set_bottommost_compression_options) or + /// [`set_bottommost_zstd_max_train_bytes`](#method.set_bottommost_zstd_max_train_bytes) method with `enabled` argument /// set to `true`. /// /// # Examples @@ -1132,9 +1132,9 @@ impl Options { } /// Sets compression options for blocks at the bottom-most level. Meaning - /// of all settings is the same as in [`set_compression_options`] method but + /// of all settings is the same as in [`set_compression_options`](#method.set_compression_options) method but /// affect only the bottom-most compression which is set using - /// [`set_bottommost_compression_type`] method. + /// [`set_bottommost_compression_type`](#method.set_bottommost_compression_type) method. /// /// # Examples /// diff --git a/src/ffi_util.rs b/src/ffi_util.rs index 8753673..9c35102 100644 --- a/src/ffi_util.rs +++ b/src/ffi_util.rs @@ -83,15 +83,15 @@ macro_rules! ffi_try_impl { /// Value which can be converted into a C string. /// /// The trait is used as argument to functions which wish to accept either -/// [`&str`] or [`&CStr`] arguments while internally need to interact with +/// [`&str`] or [`&CStr`](CStr) arguments while internally need to interact with /// C APIs. Accepting [`&str`] may be more convenient for users but requires /// conversion into [`CString`] internally which requires allocation. With this -/// trait, latency-conscious users may choose to prepare `CStr` in advance and +/// trait, latency-conscious users may choose to prepare [`CStr`] in advance and /// then pass it directly without having to incur the conversion cost. /// /// To use the trait, function should accept `impl CStrLike` and after baking -/// the argument (with [`CStrLike::bake`] method) it can use it as a `&CStr` -/// (since the baked result dereferences into `CStr`). +/// the argument (with [`CStrLike::bake`] method) it can use it as a [`&CStr`](CStr) +/// (since the baked result dereferences into [`CStr`]). /// /// # Example /// @@ -114,7 +114,7 @@ pub trait CStrLike { type Baked: std::ops::Deref; type Error: std::fmt::Debug + std::fmt::Display; - /// Bakes self into value which can be freely converted into [`&CStr`]. + /// Bakes self into value which can be freely converted into [`&CStr`](CStr). /// /// This may require allocation and may fail if `self` has invalid value. fn bake(self) -> Result; diff --git a/src/write_batch.rs b/src/write_batch.rs index 8b40ccd..2aff809 100644 --- a/src/write_batch.rs +++ b/src/write_batch.rs @@ -21,7 +21,7 @@ pub type WriteBatch = WriteBatchWithTransaction; /// An atomic batch of write operations. /// -/// [`delete_range`] is not supported in [`Transaction`]. +/// [`delete_range`](#method.delete_range) is not supported in [`Transaction`]. /// /// Making an atomic commit of several writes: /// @@ -36,7 +36,7 @@ pub type WriteBatch = WriteBatchWithTransaction; /// batch.put(b"key2", b"value2"); /// batch.put(b"key3", b"value3"); /// -/// // DeleteRange is supported when use without transaction +/// // delete_range is supported when use without transaction /// batch.delete_range(b"key2", b"key3"); /// /// db.write(batch); // Atomically commits the batch @@ -44,7 +44,6 @@ pub type WriteBatch = WriteBatchWithTransaction; /// let _ = DB::destroy(&Options::default(), path); /// ``` /// -/// [`DeleteRange`]: Self::delete_range /// [`Transaction`]: crate::Transaction pub struct WriteBatchWithTransaction { pub(crate) inner: *mut ffi::rocksdb_writebatch_t,