···206207/// apply a sequence of operation JSON blobs and return the current document data.
208/// returns None if the DID is tombstoned (last op is a tombstone).
209-pub fn apply_op_log<'a>(did: &'a str, ops: &'a [Value]) -> Option<DocumentData<'a>> {
000210 // TODO: we don't verify signature chain, we should do that...
211- ops.last().and_then(|op| op_to_doc_data(did, op))
00212}
213214#[cfg(test)]
···206207/// apply a sequence of operation JSON blobs and return the current document data.
208/// returns None if the DID is tombstoned (last op is a tombstone).
209+pub fn apply_op_log<'a>(
210+ did: &'a str,
211+ ops: impl IntoIterator<Item = &'a Value>,
212+) -> Option<DocumentData<'a>> {
213 // TODO: we don't verify signature chain, we should do that...
214+ ops.into_iter()
215+ .last()
216+ .and_then(|op| op_to_doc_data(did, op))
217}
218219#[cfg(test)]