diff --git a/crates/voelin-ui-vm/src/chat/logic.rs b/crates/voelin-ui-vm/src/chat/logic.rs index 4a8721d..f2f3d19 100644 --- a/crates/voelin-ui-vm/src/chat/logic.rs +++ b/crates/voelin-ui-vm/src/chat/logic.rs @@ -1138,19 +1138,22 @@ pub fn failure_text(request: &str, code: Option, 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 {