Write the user's gateway requests as a list, not an or-pattern

rustfmt 1.94 (the pinned toolchain) and the nightly rustfmt lay out the long
or-pattern of failure_text differently, so voelin-ui-vm, clean on both when it
was merged, was not any more. A list of the eleven requests is laid out the
same by both; the requests and the answer are the same.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
faumarayandClaude Sonnet 5.5 committed 2026-10-24 15:01:01 +03:00
1 parent 84f4a4835f
commit 8aa5d6729b
1 file changed
+16 -13
+16 -13
View File
@@ -1138,19 +1138,22 @@ pub fn failure_text(request: &str, code: Option<ErrorCode>, message: &str) -> Op
if request.starts_with("config_") || request.starts_with("perm_") {
return Some(format!("{request}: {message}"));
}
let done_by_user = matches!(
request,
"post"
| "pin" | "unpin"
| "react" | "unreact"
| "create_topic"
| "update_topic"
| "create_event"
| "update_event"
| "delete_event"
| "rsvp"
);
if !done_by_user {
// The requests a user makes by hand (a list, not an or-pattern: the
// pattern's layout differs between rustfmt releases).
const DONE_BY_USER: [&str; 11] = [
"post",
"pin",
"unpin",
"react",
"unreact",
"create_topic",
"update_topic",
"create_event",
"update_event",
"delete_event",
"rsvp",
];
if !DONE_BY_USER.contains(&request) {
return None;
}
let text = match code {