Skip to content

Commit 7059fd6

Browse files
committed
docs: Provide example for Level::with_name
1 parent 37c641c commit 7059fd6

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/level.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,13 @@ impl<'a> Level<'a> {
5959
/// not allowed to be passed to this function.
6060
///
6161
/// </div>
62+
///
63+
/// # Example
64+
///
65+
/// ```rust
66+
#[doc = include_str!("../examples/custom_level.rs")]
67+
/// ```
68+
#[doc = include_str!("../examples/custom_level.svg")]
6269
pub fn with_name(self, name: impl Into<OptionCow<'a>>) -> Level<'a> {
6370
Level {
6471
name: Some(name.into().0),

0 commit comments

Comments
 (0)