Skip to content

Commit

Permalink
chore: replace x with y for hexa-decimal fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
Ghamza-Jd authored Apr 12, 2024
1 parent 7942405 commit fa21dd4
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions library/core/src/fmt/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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");
/// ```
Expand Down Expand Up @@ -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");
/// ```
Expand Down

0 comments on commit fa21dd4

Please sign in to comment.