chore: replace x with y for hexa-decimal fmt

This commit is contained in:
Hamza Jadid 2024-04-13 02:16:20 +03:00 committed by GitHub
parent 79424056b0
commit fa21dd4a97
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 6 deletions

View File

@ -860,10 +860,10 @@ pub trait Binary {
/// Basic usage with `i32`:
///
/// ```
/// let x = 42; // 42 is '2a' in hex
/// let y = 42; // 42 is '2a' in hex
///
/// assert_eq!(format!("{x:x}"), "2a");
/// assert_eq!(format!("{x:#x}"), "0x2a");
/// assert_eq!(format!("{y:x}"), "2a");
/// assert_eq!(format!("{y:#x}"), "0x2a");
///
/// assert_eq!(format!("{:x}", -16), "fffffff0");
/// ```
@ -915,10 +915,10 @@ pub trait LowerHex {
/// Basic usage with `i32`:
///
/// ```
/// let x = 42; // 42 is '2A' in hex
/// let y = 42; // 42 is '2A' in hex
///
/// assert_eq!(format!("{x:X}"), "2A");
/// assert_eq!(format!("{x:#X}"), "0x2A");
/// assert_eq!(format!("{y:X}"), "2A");
/// assert_eq!(format!("{y:#X}"), "0x2A");
///
/// assert_eq!(format!("{:X}", -16), "FFFFFFF0");
/// ```