Remove expect from contextual fragment wrapper

Replace the expect call in ContextualUserFragment::wrap_contextual_user_body with an explicit pattern match so the code stays compatible with the repo's clippy policy.

Co-authored-by: Codex <noreply@openai.com>
This commit is contained in:
Charles Cunningham
2026-03-13 11:01:13 -07:00
co-authored by Codex
parent 877d86ac78
commit fc3caab095
+3 -3
View File
@@ -69,9 +69,9 @@ pub(crate) trait ContextualUserFragment {
}
fn wrap_contextual_user_body(body: String) -> String {
let markers = Self::markers().expect(
"contextual-user fragments using wrap_contextual_user_body must define markers",
);
let Some(markers) = Self::markers() else {
panic!("contextual-user fragments using wrap_contextual_user_body must define markers");
};
markers.wrap_body(body)
}
}