Fix to avoid deprecated `raw::from_buf` in the Rust standard library.
Implement snapshots.