Rollup merge of #128499 - Konippi:refactor-backtrace-formatting, r=tg… · model-checking/verify-rust-std@f859e54 (original) (raw)
Navigation Menu
- GitHub Copilot Write better code with AI
- GitHub Models New Manage and compare prompts
- GitHub Advanced Security Find and fix vulnerabilities
- Actions Automate any workflow
- Codespaces Instant dev environments
- Issues Plan and track work
- Code Review Manage code changes
- Discussions Collaborate outside of code
- Code Search Find more, search less
- Explore
- Pricing
Provide feedback
Saved searches
Use saved searches to filter your results more quickly
Appearance settings
Commit f859e54
Rollup merge of rust-lang#128499 - Konippi:refactor-backtrace-formatting, r=tgross35
chore: refactor backtrace formatting Replace `write_str()` with the `writeln!()` macro, consolidating multiple write operations.
File tree
1 file changed
lines changed
1 file changed
lines changed
Lines changed: 2 additions & 7 deletions
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -500,13 +500,8 @@ where | ||
500 | 500 | } |
501 | 501 | |
502 | 502 | if self.show_backtrace { |
503 | -let backtrace = self.backtrace(); | |
504 | - | |
505 | -if let Some(backtrace) = backtrace { | |
506 | -let backtrace = backtrace.to_string(); | |
507 | - | |
508 | - f.write_str("\n\nStack backtrace:\n")?; | |
509 | - f.write_str(backtrace.trim_end())?; | |
503 | +if let Some(backtrace) = self.backtrace() { | |
504 | +write!(f, "\n\nStack backtrace:\n{}", backtrace.to_string().trim_end())?; | |
510 | 505 | } |
511 | 506 | } |
512 | 507 |