client/Response: refactor FormatError() to use libfmt

This commit is contained in:
Max Kellermann
2021-05-25 16:11:35 +02:00
parent 18efda719e
commit 0d97eba7a5
6 changed files with 56 additions and 33 deletions

View File

@@ -407,8 +407,9 @@ handle_idle(Client &client, Request args, Response &r)
for (const char *i : args) {
unsigned event = idle_parse_name(i);
if (event == 0) {
r.FormatError(ACK_ERROR_ARG,
"Unrecognized idle event: %s", i);
r.FmtError(ACK_ERROR_ARG,
FMT_STRING("Unrecognized idle event: {}"),
i);
return CommandResult::ERROR;
}