Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

zeta eval: Allow no headings under "Expected Context" (#42638)

Agus Zubiagac2c5fceb5bd9
diff --git a/crates/zeta_cli/src/example.rs b/crates/zeta_cli/src/example.rs
index 5732e1efcb0..300e453af93 100644
--- a/crates/zeta_cli/src/example.rs
+++ b/crates/zeta_cli/src/example.rs
@@ -259,6 +259,11 @@ impl NamedExample {
if !text.ends_with('\n') {
text.push('\n');
}
+
+ if named.example.expected_context.is_empty() {
+ named.example.expected_context.push(Default::default());
+ }
+
let alternatives = &mut named
.example
.expected_context