Skip to content

Commit 99e9da1

Browse files
authored
chore: replace x with y for hexa-decimal fmt
1 parent 4ad58e6 commit 99e9da1

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

Diff for: core/src/fmt/mod.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -860,10 +860,10 @@ pub trait Binary {
860860
/// Basic usage with `i32`:
861861
///
862862
/// ```
863-
/// let x = 42; // 42 is '2a' in hex
863+
/// let y = 42; // 42 is '2a' in hex
864864
///
865-
/// assert_eq!(format!("{x:x}"), "2a");
866-
/// assert_eq!(format!("{x:#x}"), "0x2a");
865+
/// assert_eq!(format!("{y:x}"), "2a");
866+
/// assert_eq!(format!("{y:#x}"), "0x2a");
867867
///
868868
/// assert_eq!(format!("{:x}", -16), "fffffff0");
869869
/// ```
@@ -915,10 +915,10 @@ pub trait LowerHex {
915915
/// Basic usage with `i32`:
916916
///
917917
/// ```
918-
/// let x = 42; // 42 is '2A' in hex
918+
/// let y = 42; // 42 is '2A' in hex
919919
///
920-
/// assert_eq!(format!("{x:X}"), "2A");
921-
/// assert_eq!(format!("{x:#X}"), "0x2A");
920+
/// assert_eq!(format!("{y:X}"), "2A");
921+
/// assert_eq!(format!("{y:#X}"), "0x2A");
922922
///
923923
/// assert_eq!(format!("{:X}", -16), "FFFFFFF0");
924924
/// ```

0 commit comments

Comments
 (0)