wasmer_journal/
util.rs

1
2
3
4
5
6
7
8
9
10
11
use super::*;

pub fn copy_journal<R: ReadableJournal, W: WritableJournal>(
    from: &R,
    to: &W,
) -> anyhow::Result<()> {
    while let Some(record) = from.read()? {
        to.write(record.into_inner())?;
    }
    Ok(())
}