Fix rustdoc::broken-intra-doc-links errors (#744)

master
Yuri Kotov 2 years ago committed by GitHub
parent ca6c6a5ca0
commit 9157df0c6f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      .github/workflows/rust.yml
  2. 8
      src/db_options.rs
  3. 10
      src/ffi_util.rs
  4. 5
      src/write_batch.rs

@ -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

@ -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
///

@ -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<Target = CStr>;
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<Self::Baked, Self::Error>;

@ -21,7 +21,7 @@ pub type WriteBatch = WriteBatchWithTransaction<false>;
/// 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<false>;
/// 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<false>;
/// let _ = DB::destroy(&Options::default(), path);
/// ```
///
/// [`DeleteRange`]: Self::delete_range
/// [`Transaction`]: crate::Transaction
pub struct WriteBatchWithTransaction<const TRANSACTION: bool> {
pub(crate) inner: *mut ffi::rocksdb_writebatch_t,

Loading…
Cancel
Save