Add local variable to reduce line length

In order to reduce the line length introduce a local variable `align`.

Refactor only, no logic changes.
This commit is contained in:
Tobin C. Harding 2022-11-18 13:09:28 +11:00
parent b2e74bc050
commit 1ecf09359b
1 changed files with 2 additions and 1 deletions

View File

@ -413,7 +413,8 @@ fn fmt_satoshi_in(
}
let width = options.width.unwrap_or(0);
let (left_pad, pad_right) = match (num_width < width, options.sign_aware_zero_pad, options.align.unwrap_or(fmt::Alignment::Right)) {
let align = options.align.unwrap_or(fmt::Alignment::Right);
let (left_pad, pad_right) = match (num_width < width, options.sign_aware_zero_pad, align) {
(false, _, _) => (0, 0),
// Alignment is always right (ignored) when zero-padding
(true, true, _) | (true, false, fmt::Alignment::Right) => (width - num_width, 0),