mirror of
https://github.com/openai/codex.git
synced 2026-10-29 19:08:43 +00:00
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:
co-authored by
Codex
parent
877d86ac78
commit
fc3caab095
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user