Skip to content

Commit

Permalink
Add doc checks to before_commit.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ethiraric committed Mar 28, 2024
1 parent 0fa6d7a commit ddcbcca
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ before_commit:
cargo test --release
cargo test --doc
cargo build --profile=release-lto --package gen_large_yaml --bin gen_large_yaml --manifest-path tools/gen_large_yaml/Cargo.toml
RUSTDOCFLAGS="-D warnings" cargo doc --all-features

ethi_bench:
cargo build --release --all-targets
Expand Down
2 changes: 1 addition & 1 deletion src/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ impl<T: Iterator<Item = char>> Parser<T> {
/// Try to load the next event and return it, but do not consuming it from `self`.
///
/// Any subsequent call to [`Parser::peek`] will return the same value, until a call to
/// [`Parser::next`] or [`Parser::load`].
/// [`Iterator::next`] or [`Parser::load`].
/// # Errors
/// Returns `ScanError` when loading the next event fails.
pub fn peek(&mut self) -> Result<&(Event, Marker), ScanError> {
Expand Down
6 changes: 3 additions & 3 deletions src/scanner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ impl fmt::Display for ScanError {
/// The contents of a scanner token.
#[derive(Clone, PartialEq, Debug, Eq)]
pub enum TokenType {
/// The start of the stream. Sent first, before even [`DocumentStart`].
/// The start of the stream. Sent first, before even [`TokenType::DocumentStart`].
StreamStart(TEncoding),
/// The end of the stream, EOF.
StreamEnd,
Expand Down Expand Up @@ -324,8 +324,8 @@ const BUFFER_LEN: usize = 16;
/// some of the constructs. It has understanding of indentation and whitespace and is able to
/// generate error messages for some invalid YAML constructs.
///
/// It is however not a full parser and needs [`parser::Parser`] to fully detect invalid YAML
/// documents.
/// It is however not a full parser and needs [`crate::parser::Parser`] to fully detect invalid
/// YAML documents.
#[derive(Debug)]
#[allow(clippy::struct_excessive_bools)]
pub struct Scanner<T> {
Expand Down

0 comments on commit ddcbcca

Please sign in to comment.