Print TypeId
as hex for debugging · model-checking/verify-rust-std@986dbd1 (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 986dbd1
Print TypeId
as hex for debugging
In <rust-lang#127134>, the `Debug` impl for `TypeId` was changed to print a single integer rather than a tuple. Change this again to print as hex for more concise and consistent formatting, as was suggested. Result: TypeId(0x1378bb1c0a0202683eb65e7c11f2e4d7)
File tree
1 file changed
lines changed
1 file changed
lines changed
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -673,7 +673,7 @@ impl hash::Hash for TypeId { | ||
673 | 673 | #[stable(feature = "rust1", since = "1.0.0")] |
674 | 674 | impl fmt::Debug for TypeId { |
675 | 675 | fn fmt(&self, f: &mut fmt::Formatter<'_>) -> Result<(), fmt::Error> { |
676 | -f.debug_tuple("TypeId").field(&self.as_u128()).finish() | |
676 | +write!(f, "TypeId({:#034x})", self.as_u128()) | |
677 | 677 | } |
678 | 678 | } |
679 | 679 |