diff options
| author | Hamza Jadid <hamzah.jadeed@gmail.com> | 2024-04-13 02:16:20 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-04-13 02:16:20 +0300 |
| commit | fa21dd4a97af4c78f9f24b52d22174563a74a335 (patch) | |
| tree | 124b04633865da09fc29dc111232e9799177fa14 /library/core/src | |
| parent | 79424056b05eaa9563d16dfab9b9a0c8f033f220 (diff) | |
chore: replace x with y for hexa-decimal fmt
Diffstat (limited to 'library/core/src')
| -rw-r--r-- | library/core/src/fmt/mod.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/library/core/src/fmt/mod.rs b/library/core/src/fmt/mod.rs index 287f6c23c89..0a660a3b3f8 100644 --- a/library/core/src/fmt/mod.rs +++ b/library/core/src/fmt/mod.rs @@ -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"); /// ``` |
