Skip to content

Commit

Permalink
commitlog: Fix rustoc warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
kim committed Oct 8, 2024
1 parent 6c58c55 commit 04b242a
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions crates/commitlog/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ impl Default for Options {
/// The canonical commitlog, backed by on-disk log files.
///
/// Records in the log are of type `T`, which canonically is instantiated to
/// [`Txdata`].
/// [`payload::Txdata`].
pub struct Commitlog<T> {
inner: RwLock<commitlog::Generic<repo::Fs, T>>,
}
Expand Down Expand Up @@ -372,7 +372,7 @@ impl<T: Encode> Commitlog<T> {
/// data (e.g. `Decoder<Record = ()>`), as it will not allocate the commit
/// payload into a struct.
///
/// Note that, unlike [`Self::transaction`], this method will ignore a
/// Note that, unlike [`Self::transactions`], this method will ignore a
/// corrupt commit at the very end of the traversed log.
pub fn fold_transactions<D>(&self, de: D) -> Result<(), D::Error>
where
Expand Down
4 changes: 2 additions & 2 deletions crates/commitlog/src/payload.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ impl Encode for () {
///
/// Unlike [`Encode`], this is not a datatype: the canonical commitlog format
/// requires to look up row types during log traversal in order to be able to
/// decode (see also [`RowDecoder`]).
/// decode.
pub trait Decoder {
/// The type of records this decoder can decode.
/// This is also the type which can be appended to a commitlog, and so must
Expand All @@ -53,7 +53,7 @@ pub trait Decoder {
/// Decode one [`Self::Record`] from the given buffer.
///
/// The `version` argument corresponds to the log format version of the
/// current segment (see [`segment::Header::log_format_version`]).
/// current segment (see [`crate::segment::Header::log_format_version`]).
///
/// The `tx_argument` is the transaction offset of the current record
/// relative to the start of the log.
Expand Down
2 changes: 1 addition & 1 deletion crates/commitlog/src/payload/txdata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use crate::{
// Re-export so we get a hyperlink in rustdocs by default
pub use spacetimedb_primitives::TableId;

/// A visitor useful to implement stateful [`Decoder`]s of [`Txdata`] payloads.
/// A visitor useful to implement stateful [`super::Decoder`]s of [`Txdata`] payloads.
pub trait Visitor {
type Error: From<DecodeError>;
/// The type corresponding to one element in [`Ops::rowdata`].
Expand Down
8 changes: 4 additions & 4 deletions crates/commitlog/src/repo/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ pub trait Repo: Clone {
/// `offset` does not exist.
///
/// The method does not guarantee that the segment is non-empty -- this case
/// will be caught by [`open_segment_writer`] and [`open_segment_reader`]
/// will be caught by [`resume_segment_writer`] and [`open_segment_reader`]
/// respectively.
fn open_segment(&self, offset: u64) -> io::Result<Self::Segment>;

Expand Down Expand Up @@ -178,9 +178,9 @@ pub fn resume_segment_writer<R: Repo>(

/// Open the existing segment at `offset` for reading.
///
/// Unlike [`open_segment_writer`], this does not traverse the segment. It does,
/// however, attempt to read the segment header and checks that the log format
/// version and checksum algorithm are compatible.
/// Unlike [`resume_segment_writer`], this does not traverse the segment. It
/// does, however, attempt to read the segment header and checks that the log
/// format version and checksum algorithm are compatible.
pub fn open_segment_reader<R: Repo>(
repo: &R,
max_log_format_version: u8,
Expand Down

0 comments on commit 04b242a

Please sign in to comment.