Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/level.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@ impl<'a> Level<'a> {
level: self.level,
}
}

/// Do not show the [`Level`]s name
pub fn no_name(self) -> Level<'a> {
self.with_name(None::<&str>)
}
}

impl<'a> Level<'a> {
Expand Down
2 changes: 1 addition & 1 deletion tests/formatter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2397,7 +2397,7 @@ fn secondary_title_no_level_text() {
)
.element(
Level::NOTE
.with_name(None::<&str>)
.no_name()
.title("expected reference `&str`\nfound reference `&'static [u8; 0]`"),
),
];
Expand Down