Skip to content

Commit

Permalink
Clean up formatting for additional context pages
Browse files Browse the repository at this point in the history
  • Loading branch information
TehPers committed Aug 18, 2024
1 parent d30c6cd commit d8da339
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/assertions/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -159,18 +159,19 @@ impl Display for AssertionError {
// Write non-visited frames
for frame in &self.cx.remaining[self.cx.recovered.len()..] {
writeln!(f, " {frame}: {}", styles::dimmed(&"(not visited)"))?;
writeln!(f)?;
idx += 1;
}

// Write context pages
for (idx, (title, page)) in pages.into_iter().enumerate() {
writeln!(f)?;
writeln!(
f,
"----- {title} {} -----",
styles::reference(&format_args!("[{}]", idx + 1))
)?;
writeln!(f, "{page}")?;
writeln!(f)?;
}

Ok(())
Expand Down

0 comments on commit d8da339

Please sign in to comment.