Update printf-compat

This commit is contained in:
Xiretza 2023-04-23 11:01:40 +00:00 committed by Johannes Altmanninger
parent 544bd183da
commit 81cdd51597
2 changed files with 11 additions and 6 deletions

2
fish-rust/Cargo.lock generated
View File

@ -821,7 +821,7 @@ dependencies = [
[[package]]
name = "printf-compat"
version = "0.1.1"
source = "git+https://github.com/fish-shell/printf-compat.git?branch=fish#d5f98dc8ce7a63e6639b08082ffbc6499021260c"
source = "git+https://github.com/fish-shell/printf-compat.git?branch=fish#ff460021ba11e2a2c69e1fe04cb1961d6a75be15"
dependencies = [
"bitflags",
"itertools 0.9.0",

View File

@ -266,11 +266,16 @@ impl<'a> builtin_printf_state_t<'a> {
$fmt:expr, // format string of type &wstr
$($arg:expr),* // arguments
) => {
sprintf_locale(
$fmt,
&self.locale,
&[$($arg.to_arg()),*]
)
{
let mut target = WString::new();
sprintf_locale(
&mut target,
$fmt,
&self.locale,
&[$($arg.to_arg()),*]
);
target
}
}
}