Skip to content

Commit 4566d4a

Browse files
authored
Merge pull request #119 from Muscraft/add-derive-debug
Add derive debug for public types
2 parents e3658b6 + b816eb9 commit 4566d4a

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

src/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#![deny(rust_2018_idioms)]
2+
#![warn(missing_debug_implementations)]
23

34
//! A library for formatting of text or programming code snippets.
45
//!

src/renderer/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ use stylesheet::Stylesheet;
2424
pub const DEFAULT_TERM_WIDTH: usize = 140;
2525

2626
/// A renderer for [`Message`]s
27-
#[derive(Clone)]
27+
#[derive(Clone, Debug)]
2828
pub struct Renderer {
2929
anonymized_line_numbers: bool,
3030
term_width: usize,

src/snippet.rs

+2
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ use std::ops::Range;
1515
/// Primary structure provided for formatting
1616
///
1717
/// See [`Level::title`] to create a [`Message`]
18+
#[derive(Debug)]
1819
pub struct Message<'a> {
1920
pub(crate) level: Level,
2021
pub(crate) id: Option<&'a str>,
@@ -55,6 +56,7 @@ impl<'a> Message<'a> {
5556
///
5657
/// One `Snippet` is meant to represent a single, continuous,
5758
/// slice of source code that you want to annotate.
59+
#[derive(Debug)]
5860
pub struct Snippet<'a> {
5961
pub(crate) origin: Option<&'a str>,
6062
pub(crate) line_start: usize,

0 commit comments

Comments
 (0)