diff options
| author | tv <tv@krebsco.de> | 2026-10-31 13:25:11 +0100 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-10-31 13:25:11 +0100 |
| commit | 694347ad456766004e2792c4b4cda865a8a40386 (patch) | |
| tree | ebcc97eef8ffd9954e3ecae75bcf5935f5c33d9a /src/state/read.rs | |
| parent | 028f80f46784b483215ab7a2952cc54fdd46ea5d (diff) | |
rename AutoMerge to Document
Diffstat (limited to 'src/state/read.rs')
| -rw-r--r-- | src/state/read.rs | 9 |
1 files changed, 4 insertions, 5 deletions
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<AutoCommit>, + pub(crate) doc: Arc<Document>, } /// 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<Vec<ChangeHash>>), axum::http::StatusCode> where @@ -67,7 +66,7 @@ impl AppState { async fn render_live<T, R>( &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<Vec<ChangeHash>>) where |
