pretty_printer/
lib.rs

1/// A macro to simplify pretty-printing of debug information using `println!`.
2///
3/// This macro prints the provided value using Rust's pretty print formatting (`{:#?}`),
4/// which is particularly useful for printing complex structures in a more readable form.
5///
6/// # Examples
7///
8/// ```
9/// use pretty_printer::pretty_print;
10///
11/// let my_data = vec![1, 2, 3];
12/// pretty_printer!(my_data);
13/// ```
14///
15/// This will output:
16/// ```text
17/// [
18///     1,
19///     2,
20///     3,
21/// ]
22/// `
23#[macro_export]
24macro_rules! pretty_print {
25    ($val: expr) => {
26        println!("{:#?}", $val);
27    };
28}