diff --git a/cozo-core/src/runtime/db.rs b/cozo-core/src/runtime/db.rs index ea796ba5..90996a57 100644 --- a/cozo-core/src/runtime/db.rs +++ b/cozo-core/src/runtime/db.rs @@ -136,6 +136,15 @@ pub struct NamedRows { pub next: Option>, } +impl IntoIterator for NamedRows { + type Item = Tuple; + type IntoIter = std::vec::IntoIter; + + fn into_iter(self) -> Self::IntoIter { + self.rows.into_iter() + } +} + impl NamedRows { /// create a named rows with the given headers and rows pub fn new(headers: Vec, rows: Vec) -> Self {