diff --git a/CHANGELOG.md b/CHANGELOG.md index 85f967e2..d379628b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ## [Unreleased] - ReleaseDate +## [0.11.2] - 2024-04-27 + +### Added + +- All public types now implement `Debug` [#119](https://github.com/rust-lang/annotate-snippets-rs/pull/119) + ## [0.11.1] - 2024-03-21 ### Fixes @@ -126,7 +132,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/). - Update the syntax to Rust 2018 idioms. (#4) -[Unreleased]: https://github.com/rust-lang/annotate-snippets-rs/compare/0.11.1...HEAD +[Unreleased]: https://github.com/rust-lang/annotate-snippets-rs/compare/0.11.2...HEAD +[0.11.2]: https://github.com/rust-lang/annotate-snippets-rs/compare/0.11.1...0.11.2 [0.11.1]: https://github.com/rust-lang/annotate-snippets-rs/compare/0.11.0...0.11.1 [0.11.0]: https://github.com/rust-lang/annotate-snippets-rs/compare/0.10.2...0.11.0 [0.10.2]: https://github.com/rust-lang/annotate-snippets-rs/compare/0.10.1...0.10.2 diff --git a/Cargo.lock b/Cargo.lock index 479ee8cf..db244d14 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -19,7 +19,7 @@ checksum = "4b46cbb362ab8752921c97e041f5e366ee6297bd428a31275b9fcf1e380f7299" [[package]] name = "annotate-snippets" -version = "0.11.1" +version = "0.11.2" dependencies = [ "anstream", "anstyle", diff --git a/Cargo.toml b/Cargo.toml index a9a7c284..5a5d40b2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "annotate-snippets" -version = "0.11.1" +version = "0.11.2" edition = "2021" rust-version = "1.73" # MSRV authors = ["Zibi Braniecki "] diff --git a/src/lib.rs b/src/lib.rs index a2e4231d..bfd2dc6d 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,4 +1,5 @@ #![deny(rust_2018_idioms)] +#![warn(missing_debug_implementations)] //! A library for formatting of text or programming code snippets. //! diff --git a/src/renderer/mod.rs b/src/renderer/mod.rs index ee63da9f..845d2931 100644 --- a/src/renderer/mod.rs +++ b/src/renderer/mod.rs @@ -24,7 +24,7 @@ use stylesheet::Stylesheet; pub const DEFAULT_TERM_WIDTH: usize = 140; /// A renderer for [`Message`]s -#[derive(Clone)] +#[derive(Clone, Debug)] pub struct Renderer { anonymized_line_numbers: bool, term_width: usize, diff --git a/src/snippet.rs b/src/snippet.rs index e7d4bef6..8e9a3a88 100644 --- a/src/snippet.rs +++ b/src/snippet.rs @@ -15,6 +15,7 @@ use std::ops::Range; /// Primary structure provided for formatting /// /// See [`Level::title`] to create a [`Message`] +#[derive(Debug)] pub struct Message<'a> { pub(crate) level: Level, pub(crate) id: Option<&'a str>, @@ -55,6 +56,7 @@ impl<'a> Message<'a> { /// /// One `Snippet` is meant to represent a single, continuous, /// slice of source code that you want to annotate. +#[derive(Debug)] pub struct Snippet<'a> { pub(crate) origin: Option<&'a str>, pub(crate) line_start: usize,