Skip to content

Commit 1790d59

Browse files
Fix doc warnings (#1197)
* Fix and Improve liveliness doc * Fix doc warnings * Add doc warnings check in CI
1 parent ebc684c commit 1790d59

File tree

34 files changed

+128
-88
lines changed

34 files changed

+128
-88
lines changed

.github/workflows/ci.yml

+5
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,11 @@ jobs:
8686
- name: Run doctests
8787
run: cargo test --doc
8888

89+
- name: Build doc
90+
run: cargo doc --no-deps --features unstable
91+
env:
92+
RUSTDOCFLAGS: -Dwarnings
93+
8994
- name: Check licenses
9095
run: cargo deny check licenses
9196

commons/zenoh-keyexpr/src/key_expr/format/mod.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
//! The same issue arises naturally when designing a KE space, and [`KeFormat`] was designed to help you with this,
1818
//! both in constructing and in parsing KEs that fit the formats you've defined.
1919
//!
20-
//! [`kedefine`](https://docs.rs/zenoh/0.10.1-rc/zenoh/macro.kedefine.html) also allows you to define formats at compile time, allowing a more performant, but more importantly safer and more convenient use of said formats,
21-
//! as the [`keformat`](https://docs.rs/zenoh/0.10.1-rc/zenoh/macro.keformat.html) and [`kewrite`](https://docs.rs/zenoh/0.10.1-rc/zenoh/macro.kewrite.html) macros will be able to tell you if you're attempting to set fields of the format that do not exist.
20+
//! [`kedefine`](https://docs.rs/zenoh/latest/zenoh/key_expr/format/macro.kedefine.html) also allows you to define formats at compile time, allowing a more performant, but more importantly safer and more convenient use of said formats,
21+
//! as the [`keformat`](https://docs.rs/zenoh/latest/zenoh/key_expr/format/macro.keformat.htmll) and [`kewrite`](https://docs.rs/zenoh/latest/zenoh/key_expr/format/macro.kewrite.html) macros will be able to tell you if you're attempting to set fields of the format that do not exist.
2222
//!
2323
//! ## The format syntax
2424
//! KE formats are defined following a syntax that extends the [`keyexpr`] syntax. In addition to existing chunk types, KE formmats support "specification" chunks.
@@ -67,8 +67,8 @@ use support::{IterativeConstructor, Spec};
6767
/// The same issue arises naturally when designing a KE space, and [`KeFormat`] was designed to help you with this,
6868
/// both in constructing and in parsing KEs that fit the formats you've defined.
6969
///
70-
/// [`zenoh::kedefine`](https://docs.rs/zenoh/0.10.1-rc/zenoh/macro.kedefine.html) also allows you to define formats at compile time, allowing a more performant, but more importantly safer and more convenient use of said formats,
71-
/// as the [`zenoh::keformat`](https://docs.rs/zenoh/0.10.1-rc/zenoh/macro.keformat.html) and [`zenoh::kewrite`](https://docs.rs/zenoh/0.10.1-rc/zenoh/macro.kewrite.html) macros will be able to tell you if you're attempting to set fields of the format that do not exist.
70+
/// [`kedefine`](https://docs.rs/zenoh/latest/zenoh/key_expr/format/macro.kedefine.html) also allows you to define formats at compile time, allowing a more performant, but more importantly safer and more convenient use of said formats,
71+
/// as the [`keformat`](https://docs.rs/zenoh/latest/zenoh/key_expr/format/macro.keformat.html) and [`kewrite`](https://docs.rs/zenoh/latest/zenoh/macro.kewrite.html) macros will be able to tell you if you're attempting to set fields of the format that do not exist.
7272
///
7373
/// ## The format syntax
7474
/// KE formats are defined following a syntax that extends the [`keyexpr`] syntax. In addition to existing chunk types, KE formmats support "specification" chunks.
@@ -120,7 +120,7 @@ impl<'s> KeFormat<'s, Vec<Segment<'s>>> {
120120
///
121121
/// `N` is simply the number of specifications in `value`. If this number of specs isn't known at compile-time, use [`KeFormat::new`] instead.
122122
///
123-
/// If you know `value` at compile time, using [`zenoh::kedefine`](https://docs.rs/zenoh/0.10.1-rc/zenoh/macro.kedefine.html) instead is advised,
123+
/// If you know `value` at compile time, using [`kedefine`](https://docs.rs/zenoh/latest/zenoh/key_expr/format/macro.kedefine.html) instead is advised,
124124
/// as it will provide more features and construct higher performance formats than this constructor.
125125
pub fn noalloc_new<const N: usize>(value: &'s str) -> ZResult<KeFormat<'s, [Segment<'s>; N]>> {
126126
value.try_into()

commons/zenoh-keyexpr/src/keyexpr_tree/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
//! # Iterators
4848
//! KeTrees provide iterators for the following operations:
4949
//! - Iterating on all nodes ([`IKeyExprTree::tree_iter`]/[`IKeyExprTreeMut::tree_iter_mut`])
50-
//! - Iterating on key-value pairs in the KeTree ([`IKeyExprTreeExt::key_value_pairs`])
50+
//! - Iterating on key-value pairs in the KeTree ([`IKeyExprTree::key_value_pairs`])
5151
//! - Iterating on nodes whose KE intersects with a queried KE ([`IKeyExprTree::intersecting_nodes`], [`IKeyExprTreeMut::intersecting_nodes_mut`])
5252
//! - Iterating on nodes whose KE are included by a queried KE ([`IKeyExprTree::included_nodes`], [`IKeyExprTreeMut::included_nodes_mut`])
5353
//! - Iterating on nodes whose KE includes a queried KE ([`IKeyExprTree::nodes_including`], [`IKeyExprTreeMut::nodes_including_mut`])

commons/zenoh-keyexpr/src/lib.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222
//! # Storing Key Expressions
2323
//! This module provides 2 flavours to store strings that have been validated to respect the KE syntax, and a third is provided by [`zenoh`](https://docs.rs/zenoh):
2424
//! - [`keyexpr`] is the equivalent of a [`str`],
25-
//! - [`OwnedKeyExpr`] works like an [`Arc<str>`],
26-
//! - [`KeyExpr`](https://docs.rs/zenoh/latest/zenoh/key_expr/struct.KeyExpr.html) works like a [`Cow<str>`], but also stores some additional context internal to Zenoh to optimize
25+
//! - [`OwnedKeyExpr`] works like an [`Arc<str>`](std::sync::Arc),
26+
//! - [`KeyExpr`](https://docs.rs/zenoh/latest/zenoh/key_expr/struct.KeyExpr.html) works like a [`Cow<str>`](std::borrow::Cow), but also stores some additional context internal to Zenoh to optimize
2727
//! routing and network usage.
2828
//!
2929
//! All of these types [`Deref`](core::ops::Deref) to [`keyexpr`], which notably has methods to check whether a given [`keyexpr::intersects`] with another,
@@ -40,8 +40,8 @@
4040
//! The same issue arises naturally when designing a KE space, and [`KeFormat`](format::KeFormat) was designed to help you with this,
4141
//! both in constructing and in parsing KEs that fit the formats you've defined.
4242
//!
43-
//! [`kedefine`] also allows you to define formats at compile time, allowing a more performant, but more importantly safer and more convenient use of said formats,
44-
//! as the [`keformat`] and [`kewrite`] macros will be able to tell you if you're attempting to set fields of the format that do not exist.
43+
//! [`kedefine`](https://docs.rs/zenoh/latest/zenoh/key_expr/format/macro.kedefine.html) also allows you to define formats at compile time, allowing a more performant, but more importantly safer and more convenient use of said formats,
44+
//! as the [`keformat`](https://docs.rs/zenoh/latest/zenoh/key_expr/format/macro.keformat.html) and [`kewrite`](https://docs.rs/zenoh/latest/zenoh/key_expr/format/macro.kewrite.html) macros will be able to tell you if you're attempting to set fields of the format that do not exist.
4545
4646
#![cfg_attr(not(feature = "std"), no_std)]
4747
extern crate alloc;

commons/zenoh-protocol/src/core/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ impl<'de> serde::Deserialize<'de> for ZenohIdProto {
273273
}
274274
}
275275

276-
/// The unique id of a zenoh entity inside it's parent [`Session`].
276+
/// The unique id of a zenoh entity inside it's parent `Session`.
277277
pub type EntityId = u32;
278278

279279
/// The global unique id of a zenoh entity.

commons/zenoh-protocol/src/core/parameters.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ pub fn iter(s: &str) -> impl DoubleEndedIterator<Item = (&str, &str)> + Clone {
5050
.map(|p| split_once(p, FIELD_SEPARATOR))
5151
}
5252

53-
/// Same as [`Self::from_iter_into`] but keys are sorted in alphabetical order.
53+
/// Same as [`from_iter_into`] but keys are sorted in alphabetical order.
5454
pub fn sort<'s, I>(iter: I) -> impl Iterator<Item = (&'s str, &'s str)>
5555
where
5656
I: Iterator<Item = (&'s str, &'s str)>,
@@ -84,7 +84,7 @@ where
8484
into
8585
}
8686

87-
/// Same as [`Self::from_iter`] but it writes into a user-provided string instead of allocating a new one.
87+
/// Same as [`from_iter`] but it writes into a user-provided string instead of allocating a new one.
8888
pub fn from_iter_into<'s, I>(iter: I, into: &mut String)
8989
where
9090
I: Iterator<Item = (&'s str, &'s str)>,
@@ -131,7 +131,7 @@ pub fn insert<'s>(s: &'s str, k: &'s str, v: &'s str) -> (String, Option<&'s str
131131
(from_iter(iter), item)
132132
}
133133

134-
/// Same as [`Self::insert`] but keys are sorted in alphabetical order.
134+
/// Same as [`insert`] but keys are sorted in alphabetical order.
135135
pub fn insert_sort<'s>(s: &'s str, k: &'s str, v: &'s str) -> (String, Option<&'s str>) {
136136
let (iter, item) = _insert(iter(s), k, v);
137137
(from_iter(sort(iter)), item)

commons/zenoh-protocol/src/network/declare.rs

+6-2
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ pub mod flag {
3232
pub const Z: u8 = 1 << 7; // 0x80 Extensions if Z==1 then an extension will follow
3333
}
3434

35+
/// ```text
3536
/// Flags:
3637
/// - I: Interest If I==1 then interest_id is present
3738
/// - X: Reserved
@@ -47,7 +48,7 @@ pub mod flag {
4748
/// +---------------+
4849
/// ~ declaration ~
4950
/// +---------------+
50-
///
51+
/// ```
5152
#[derive(Debug, Clone, PartialEq, Eq)]
5253
pub struct Declare {
5354
pub interest_id: Option<super::interest::InterestId>,
@@ -178,6 +179,7 @@ pub mod common {
178179
pub mod ext {
179180
use super::*;
180181

182+
/// ```text
181183
/// Flags:
182184
/// - N: Named If N==1 then the key expr has name/suffix
183185
/// - M: Mapping if M==1 then key expr mapping is the one declared by the sender, else it is the one declared by the receiver
@@ -190,7 +192,7 @@ pub mod common {
190192
/// +---------------+
191193
/// ~ key_suffix ~ if N==1 -- <u8;z16>
192194
/// +---------------+
193-
///
195+
/// ```
194196
pub type WireExprExt = zextzbuf!(0x0f, true);
195197
#[derive(Debug, Clone, PartialEq, Eq)]
196198
pub struct WireExprType {
@@ -513,6 +515,7 @@ pub mod queryable {
513515
pub const C: u8 = 1; // 0x01 Complete if C==1 then the queryable is complete
514516
}
515517
///
518+
/// ```text
516519
/// 7 6 5 4 3 2 1 0
517520
/// +-+-+-+-+-+-+-+-+
518521
/// |Z|0_1| ID |
@@ -521,6 +524,7 @@ pub mod queryable {
521524
/// +---------------+
522525
/// ~ distance <z16>~
523526
/// +---------------+
527+
/// ```
524528
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
525529
pub struct QueryableInfoType {
526530
pub complete: bool, // Default false: incomplete

commons/zenoh-protocol/src/network/mod.rs

+2
Original file line numberDiff line numberDiff line change
@@ -418,6 +418,7 @@ pub mod ext {
418418
}
419419
}
420420

421+
/// ```text
421422
/// 7 6 5 4 3 2 1 0
422423
/// +-+-+-+-+-+-+-+-+
423424
/// |zid_len|X|X|X|X|
@@ -426,6 +427,7 @@ pub mod ext {
426427
/// +---------------+
427428
/// % eid %
428429
/// +---------------+
430+
/// ```
429431
#[derive(Debug, Clone, PartialEq, Eq)]
430432
pub struct EntityGlobalIdType<const ID: u8> {
431433
pub zid: ZenohIdProto,

commons/zenoh-protocol/src/network/request.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -82,12 +82,13 @@ pub mod ext {
8282
pub type NodeIdType = crate::network::ext::NodeIdType<{ NodeId::ID }>;
8383

8484
pub type Target = zextz64!(0x4, true);
85+
/// ```text
8586
/// - Target (0x03)
8687
/// 7 6 5 4 3 2 1 0
8788
/// +-+-+-+-+-+-+-+-+
8889
/// % target %
8990
/// +---------------+
90-
///
91+
/// ```
9192
/// The `zenoh::queryable::Queryable`s that should be target of a `zenoh::Session::get()`.
9293
#[derive(Debug, Default, Clone, Copy, PartialEq, Eq)]
9394
pub enum TargetType {

commons/zenoh-protocol/src/scouting/hello.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ use crate::core::{Locator, WhatAmI, ZenohIdProto};
1717

1818
/// # Hello message
1919
///
20-
/// The [`Hello`] message is used to advertise the locators a zenoh node is reachable at.
21-
/// The [`Hello`] message SHOULD be sent in a unicast fashion in response to a [`super::Scout`]
20+
/// The `Hello` message is used to advertise the locators a zenoh node is reachable at.
21+
/// The `Hello` message SHOULD be sent in a unicast fashion in response to a [`super::Scout`]
2222
/// message as shown below:
2323
///
2424
/// ```text
@@ -34,7 +34,7 @@ use crate::core::{Locator, WhatAmI, ZenohIdProto};
3434
/// | | |
3535
/// ```
3636
///
37-
/// Moreover, a [`Hello`] message MAY be sent in the network in a multicast
37+
/// Moreover, a `Hello` message MAY be sent in the network in a multicast
3838
/// fashion to advertise the presence of zenoh node. The advertisement operation MAY be performed
3939
/// periodically as shown below:
4040
///
@@ -54,7 +54,7 @@ use crate::core::{Locator, WhatAmI, ZenohIdProto};
5454
/// | | |
5555
/// ```
5656
///
57-
/// Examples of locators included in the [`Hello`] message are:
57+
/// Examples of locators included in the `Hello` message are:
5858
///
5959
/// ```text
6060
/// udp/192.168.1.1:7447
@@ -63,7 +63,7 @@ use crate::core::{Locator, WhatAmI, ZenohIdProto};
6363
/// tcp/localhost:7447
6464
/// ```
6565
///
66-
/// The [`Hello`] message structure is defined as follows:
66+
/// The `Hello` message structure is defined as follows:
6767
///
6868
/// ```text
6969
/// Header flags:

commons/zenoh-protocol/src/scouting/scout.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ use crate::core::{whatami::WhatAmIMatcher, ZenohIdProto};
1818
/// The [`Scout`] message MAY be sent at any point in time to discover the available zenoh nodes in the
1919
/// network. The [`Scout`] message SHOULD be sent in a multicast or broadcast fashion. Upon receiving a
2020
/// [`Scout`] message, a zenoh node MUST first verify whether the matching criteria are satisfied, then
21-
/// it SHOULD reply with a [`super::Hello`] message in a unicast fashion including all the requested
21+
/// it SHOULD reply with a [`super::HelloProto`] message in a unicast fashion including all the requested
2222
/// information.
2323
///
2424
/// The scouting message flow is the following:

commons/zenoh-protocol/src/transport/fragment.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ pub use crate::transport::TransportSn;
1818

1919
/// # Fragment message
2020
///
21-
/// The [`Fragment`] message is used to transmit on the wire large [`crate::zenoh::ZenohMessage`]
21+
/// The [`Fragment`] message is used to transmit on the wire large [`crate::network::NetworkMessage`]
2222
/// that require fragmentation because they are larger than the maximum batch size
2323
/// (i.e. 2^16-1) and/or the link MTU.
2424
///

commons/zenoh-protocol/src/transport/frame.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ use crate::{core::Reliability, network::NetworkMessage, transport::TransportSn};
1818
/// # Frame message
1919
///
2020
/// The [`Frame`] message is used to transmit one ore more complete serialized
21-
/// [`crate::net::protocol::message::ZenohMessage`]. I.e., the total length of the
22-
/// serialized [`crate::net::protocol::message::ZenohMessage`] (s) MUST be smaller
21+
/// [`crate::network::NetworkMessage`]. I.e., the total length of the
22+
/// serialized [`crate::network::NetworkMessage`] (s) MUST be smaller
2323
/// than the maximum batch size (i.e. 2^16-1) and the link MTU.
2424
/// The [`Frame`] message is used as means to aggregate multiple
25-
/// [`crate::net::protocol::message::ZenohMessage`] in a single atomic message that
25+
/// [`crate::network::NetworkMessage`] in a single atomic message that
2626
/// goes on the wire. By doing so, many small messages can be batched together and
2727
/// share common information like the sequence number.
2828
///

commons/zenoh-protocol/src/transport/mod.rs

+2
Original file line numberDiff line numberDiff line change
@@ -255,11 +255,13 @@ impl fmt::Display for TransportMessage {
255255
pub mod ext {
256256
use crate::{common::ZExtZ64, core::Priority};
257257

258+
/// ```text
258259
/// 7 6 5 4 3 2 1 0
259260
/// +-+-+-+-+-+-+-+-+
260261
/// %0| rsv |prio %
261262
/// +---------------+
262263
/// - prio: Priority class
264+
/// ```
263265
#[repr(transparent)]
264266
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
265267
pub struct QoSType<const ID: u8> {

commons/zenoh-protocol/src/zenoh/mod.rs

+2
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,7 @@ pub mod ext {
138138

139139
use crate::core::{Encoding, EntityGlobalIdProto};
140140

141+
/// ```text
141142
/// 7 6 5 4 3 2 1 0
142143
/// +-+-+-+-+-+-+-+-+
143144
/// |zid_len|X|X|X|X|
@@ -148,6 +149,7 @@ pub mod ext {
148149
/// +---------------+
149150
/// % sn %
150151
/// +---------------+
152+
/// ```
151153
#[derive(Debug, Clone, PartialEq, Eq)]
152154
pub struct SourceInfoType<const ID: u8> {
153155
pub id: EntityGlobalIdProto,

commons/zenoh-util/src/log.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ use tracing_subscriber::{
2727
/// Calling this function initializes a `lazy_static` in the `tracing` crate
2828
/// such static is not deallocated prior to process existing, thus tools such as `valgrind`
2929
/// will report a memory leak.
30-
/// Refer to this issue: https://github.com/tokio-rs/tracing/issues/2069
30+
/// Refer to this issue: <https://github.com/tokio-rs/tracing/issues/2069>
3131
pub fn try_init_log_from_env() {
3232
if let Ok(env_filter) = EnvFilter::try_from_default_env() {
3333
init_env_filter(env_filter);
@@ -41,7 +41,7 @@ pub fn try_init_log_from_env() {
4141
/// Calling this function initializes a `lazy_static` in the `tracing` crate
4242
/// such static is not deallocated prior to process existing, thus tools such as `valgrind`
4343
/// will report a memory leak.
44-
/// Refer to this issue: https://github.com/tokio-rs/tracing/issues/2069
44+
/// Refer to this issue: <https://github.com/tokio-rs/tracing/issues/2069>
4545
pub fn init_log_from_env_or<S>(fallback: S)
4646
where
4747
S: AsRef<str>,

io/zenoh-transport/src/common/batch.rs

+15-15
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ impl BatchHeader {
149149
self.0
150150
}
151151

152-
/// Verify that the [`WBatch`][WBatch] is for a stream-based protocol, i.e., the first
152+
/// Verify that the [`WBatch`] is for a stream-based protocol, i.e., the first
153153
/// 2 bytes are reserved to encode the total amount of serialized bytes as 16-bits little endian.
154154
#[cfg(feature = "transport_compression")]
155155
#[inline(always)]
@@ -181,22 +181,22 @@ pub enum Finalize {
181181

182182
/// Write Batch
183183
///
184-
/// A [`WBatch`][WBatch] is a non-expandable and contiguous region of memory
185-
/// that is used to serialize [`TransportMessage`][TransportMessage] and [`ZenohMessage`][ZenohMessage].
184+
/// A [`WBatch`] is a non-expandable and contiguous region of memory
185+
/// that is used to serialize [`TransportMessage`] and [`NetworkMessage`].
186186
///
187-
/// [`TransportMessage`][TransportMessage] are always serialized on the batch as they are, while
188-
/// [`ZenohMessage`][ZenohMessage] are always serializaed on the batch as part of a [`TransportMessage`]
187+
/// [`TransportMessage`] are always serialized on the batch as they are, while
188+
/// [`NetworkMessage`] are always serializaed on the batch as part of a [`TransportMessage`]
189189
/// [TransportMessage] Frame. Reliable and Best Effort Frames can be interleaved on the same
190-
/// [`WBatch`][WBatch] as long as they fit in the remaining buffer capacity.
190+
/// [`WBatch`] as long as they fit in the remaining buffer capacity.
191191
///
192-
/// In the serialized form, the [`WBatch`][WBatch] always contains one or more
193-
/// [`TransportMessage`][TransportMessage]. In the particular case of [`TransportMessage`][TransportMessage] Frame,
194-
/// its payload is either (i) one or more complete [`ZenohMessage`][ZenohMessage] or (ii) a fragment of a
195-
/// a [`ZenohMessage`][ZenohMessage].
192+
/// In the serialized form, the [`WBatch`] always contains one or more
193+
/// [`TransportMessage`]. In the particular case of [`TransportMessage`] Frame,
194+
/// its payload is either (i) one or more complete [`NetworkMessage`] or (ii) a fragment of a
195+
/// a [`NetworkMessage`].
196196
///
197-
/// As an example, the content of the [`WBatch`][WBatch] in memory could be:
197+
/// As an example, the content of the [`WBatch`] in memory could be:
198198
///
199-
/// | Keep Alive | Frame Reliable<Zenoh Message, Zenoh Message> | Frame Best Effort<Zenoh Message Fragment> |
199+
/// | Keep Alive | Frame Reliable\<Zenoh Message, Zenoh Message\> | Frame Best Effort\<Zenoh Message Fragment\> |
200200
///
201201
#[derive(Clone, Debug)]
202202
pub struct WBatch {
@@ -227,20 +227,20 @@ impl WBatch {
227227
batch
228228
}
229229

230-
/// Verify that the [`WBatch`][WBatch] has no serialized bytes.
230+
/// Verify that the [`WBatch`] has no serialized bytes.
231231
#[inline(always)]
232232
pub fn is_empty(&self) -> bool {
233233
self.len() == 0
234234
}
235235

236-
/// Get the total number of bytes that have been serialized on the [`WBatch`][WBatch].
236+
/// Get the total number of bytes that have been serialized on the [`WBatch`].
237237
#[inline(always)]
238238
pub fn len(&self) -> BatchSize {
239239
let (_l, _h, p) = Self::split(self.buffer.as_slice(), &self.config);
240240
p.len() as BatchSize
241241
}
242242

243-
/// Clear the [`WBatch`][WBatch] memory buffer and related internal state.
243+
/// Clear the [`WBatch`] memory buffer and related internal state.
244244
#[inline(always)]
245245
pub fn clear(&mut self) {
246246
self.buffer.clear();

0 commit comments

Comments
 (0)