diff --git a/justfile b/justfile index 58c8c4d..f33ee69 100644 --- a/justfile +++ b/justfile @@ -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 diff --git a/src/parser.rs b/src/parser.rs index 43bf1aa..59869a2 100644 --- a/src/parser.rs +++ b/src/parser.rs @@ -267,7 +267,7 @@ impl> Parser { /// 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> { diff --git a/src/scanner.rs b/src/scanner.rs index 69f56ff..dece35b 100644 --- a/src/scanner.rs +++ b/src/scanner.rs @@ -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, @@ -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 {