From 037eab974e2fea9a608e597549dbefaefd1c58a7 Mon Sep 17 00:00:00 2001 From: Charles Chege Date: Fri, 29 Oct 2021 10:40:39 +0300 Subject: [PATCH] Document the utils module --- src/util.rs | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/util.rs b/src/util.rs index 20cc8eb3..9ffa1e4c 100644 --- a/src/util.rs +++ b/src/util.rs @@ -1,3 +1,17 @@ +/// Uses the `log` crate to perform logging. +/// This must be enabled using the feature flag `debug-print`. +/// ### Usage +/// ``` +/// use sea_orm::debug_print; +/// +/// #[derive(Debug)] +/// enum FooError { +/// Bar, +/// Baz, +/// } +/// +/// debug_print!("{:?}", FooError::Bar); +/// ``` #[macro_export] #[cfg(feature = "debug-print")] macro_rules! debug_print { @@ -5,7 +19,7 @@ macro_rules! debug_print { } #[macro_export] -// Non-debug version +/// Non-debug version #[cfg(not(feature = "debug-print"))] macro_rules! debug_print { ($( $args:expr ),*) => {