Skip to content

Commit 6cefcbb

Browse files
committed
docs(examples): Clarify we are highlighting a message, not a title
1 parent 8cd2f36 commit 6cefcbb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

examples/highlight_title.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ fn main() {
2828
let magenta = annotate_snippets::renderer::AnsiColor::Magenta
2929
.on_default()
3030
.effects(Effects::BOLD);
31-
let title = format!(
31+
let message = format!(
3232
"expected fn pointer `{}for<'a>{} fn(Box<{}(dyn Any + Send + 'a){}>) -> Pin<_>`
3333
found fn item `fn(Box<{}(dyn Any + Send + 'static){}>) -> Pin<_> {}{{wrapped_fn}}{}`",
3434
magenta.render(),
@@ -57,7 +57,7 @@ fn main() {
5757
.label("arguments to this function are incorrect"),
5858
),
5959
)
60-
.element(Level::NOTE.pre_styled_title(&title)),
60+
.element(Level::NOTE.pre_styled_title(&message)),
6161
Group::with_title(Level::NOTE.title("function defined here")).element(
6262
Snippet::source(source)
6363
.path("$DIR/highlighting.rs")

0 commit comments

Comments
 (0)