Add doc checks to before_commit.

This commit is contained in:
Ethiraric 2024-03-28 21:03:14 +01:00
parent 2dc9e2c13f
commit 2642252f7f
3 changed files with 5 additions and 4 deletions

View file

@ -7,6 +7,7 @@ before_commit:
cargo test --release cargo test --release
cargo test --doc cargo test --doc
cargo build --profile=release-lto --package gen_large_yaml --bin gen_large_yaml --manifest-path tools/gen_large_yaml/Cargo.toml 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: ethi_bench:
cargo build --release --all-targets cargo build --release --all-targets

View file

@ -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`. /// 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 /// 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 /// # Errors
/// Returns `ScanError` when loading the next event fails. /// Returns `ScanError` when loading the next event fails.
pub fn peek(&mut self) -> Result<&(Event, Marker), ScanError> { pub fn peek(&mut self) -> Result<&(Event, Marker), ScanError> {

View file

@ -135,7 +135,7 @@ impl fmt::Display for ScanError {
/// The contents of a scanner token. /// The contents of a scanner token.
#[derive(Clone, PartialEq, Debug, Eq)] #[derive(Clone, PartialEq, Debug, Eq)]
pub enum TokenType { 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), StreamStart(TEncoding),
/// The end of the stream, EOF. /// The end of the stream, EOF.
StreamEnd, StreamEnd,
@ -324,8 +324,8 @@ const BUFFER_LEN: usize = 16;
/// some of the constructs. It has understanding of indentation and whitespace and is able to /// some of the constructs. It has understanding of indentation and whitespace and is able to
/// generate error messages for some invalid YAML constructs. /// generate error messages for some invalid YAML constructs.
/// ///
/// It is however not a full parser and needs [`parser::Parser`] to fully detect invalid YAML /// It is however not a full parser and needs [`crate::parser::Parser`] to fully detect invalid
/// documents. /// YAML documents.
#[derive(Debug)] #[derive(Debug)]
#[allow(clippy::struct_excessive_bools)] #[allow(clippy::struct_excessive_bools)]
pub struct Scanner<T> { pub struct Scanner<T> {