Fix usages of fmt to format number (#15041)

Those slipped through the cracks with
https://github.com/nushell/nushell/pull/14875

Avoids deprecation warning and failure after
https://github.com/nushell/nushell/pull/15040
This commit is contained in:
Stefan Holderbach 2025-02-07 23:50:33 +01:00 committed by GitHub
parent e60dac8957
commit 17246db38b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -4,7 +4,7 @@ def format-event [ ] {
# Replace numeric value of raw_code with hex string
let record = match $record {
{raw_code: $code} => {
$record | update raw_code {|| $in | fmt | get upperhex}
$record | update raw_code {|| $in | format number | get upperhex}
}
_ => $record
}
@ -12,7 +12,7 @@ def format-event [ ] {
# Replace numeric value of raw_modifiers with binary string
let record = match $record {
{raw_modifiers: $flags} => {
$record | update raw_modifiers {|| $in | fmt | get binary}
$record | update raw_modifiers {|| $in | format number | get binary}
}
_ => $record
}