From 694347ad456766004e2792c4b4cda865a8a40386 Mon Sep 17 00:00:00 2001 From: tv Date: Sat, 31 Oct 2026 13:25:11 +0100 Subject: rename AutoMerge to Document --- src/state/read.rs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/state/read.rs') diff --git a/src/state/read.rs b/src/state/read.rs index f8323a2..a9b3116 100644 --- a/src/state/read.rs +++ b/src/state/read.rs @@ -2,16 +2,15 @@ use std::sync::Arc; -use automerge::{AutoCommit, ChangeHash}; - use super::AppState; use crate::document::replica::Epoch; +use crate::document::{ChangeHash, Document}; use crate::locks::RwLockExt; /// A read-only view of the document the node served before it started rejoining. pub(crate) struct StaleView { pub(crate) epoch: Epoch, - pub(crate) doc: Arc, + pub(crate) doc: Arc, } /// Where a read was served from. @@ -33,7 +32,7 @@ impl AppState { &self, unready_live: bool, with_heads: bool, - read: impl FnOnce(&AutoCommit) -> T + Send + 'static, + read: impl FnOnce(&Document) -> T + Send + 'static, finish: impl FnOnce(T) -> R + Send + 'static, ) -> Result<(R, ReadSource, Option>), axum::http::StatusCode> where @@ -67,7 +66,7 @@ impl AppState { async fn render_live( &self, with_heads: bool, - read: impl FnOnce(&AutoCommit) -> T + Send + 'static, + read: impl FnOnce(&Document) -> T + Send + 'static, finish: impl FnOnce(T) -> R + Send + 'static, ) -> (R, Option>) where -- cgit v1.3.1