diff --git a/fish-rust/src/parse_constants.rs b/fish-rust/src/parse_constants.rs index 895829015..7877a9f1e 100644 --- a/fish-rust/src/parse_constants.rs +++ b/fish-rust/src/parse_constants.rs @@ -322,6 +322,12 @@ impl From for &'static wstr { } } +impl printf_compat::args::ToArg<'static> for ParseKeyword { + fn to_arg(self) -> printf_compat::args::Arg<'static> { + printf_compat::args::Arg::Str(self.into()) + } +} + fn keyword_description(keyword: ParseKeyword) -> wcharz_t { let s: &'static wstr = keyword.into(); wcharz!(s) diff --git a/fish-rust/src/tokenizer.rs b/fish-rust/src/tokenizer.rs index 10d7fb16e..7461349f9 100644 --- a/fish-rust/src/tokenizer.rs +++ b/fish-rust/src/tokenizer.rs @@ -258,6 +258,12 @@ impl From for &'static wstr { } } +impl printf_compat::args::ToArg<'static> for TokenizerError { + fn to_arg(self) -> printf_compat::args::Arg<'static> { + printf_compat::args::Arg::Str(self.into()) + } +} + impl Tok { fn new(r#type: TokenType) -> Tok { Tok {