aboutsummaryrefslogtreecommitdiffstats
path: root/src/remake/coordinator.rs
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-10-31 19:53:27 +0100
committertv <tv@krebsco.de>2026-10-31 19:53:27 +0100
commit9c12bf2e8815dc9b42be62f1e1fd2932dd02938b (patch)
tree09cd985fae9142a247a2285c755f9d002a2c7b30 /src/remake/coordinator.rs
parentf4b0a7c5159d418e22682d2bd7d413fb3587ca7f (diff)
use Automerge as Document instead of AutoCommit
This allows a lot of operations to drop mut.
Diffstat (limited to 'src/remake/coordinator.rs')
-rw-r--r--src/remake/coordinator.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/remake/coordinator.rs b/src/remake/coordinator.rs
index 01937c7..314cd87 100644
--- a/src/remake/coordinator.rs
+++ b/src/remake/coordinator.rs
@@ -178,7 +178,7 @@ async fn commit<H: Host>(host: &H, id: &str, record: &Record) -> Result<(), Stor
};
// Clone under the read lock, build without any lock.
- let mut copy = host.read_doc(|doc| doc.clone()).await;
+ let copy = host.read_doc(|doc| doc.clone()).await;
// A base left to the commit is what this node has now. Every node that sees the
// decision has it too: the decision change depends on it.
let (base, fixed_now) = match &record.proposal.base_heads {
@@ -195,7 +195,7 @@ async fn commit<H: Host>(host: &H, id: &str, record: &Record) -> Result<(), Stor
};
let base_heads = fixed_now.then(|| records::encode_heads(&request.base_heads));
request.content = content;
- let mut snapshot = match snapshot::build_detached(copy, request).await {
+ let snapshot = match snapshot::build_detached(copy, request).await {
Ok((snapshot, _copy)) => snapshot,
Err(error) => {
return decide_abort(host, id, format!("snapshot build failed: {error}")).await;