aboutsummaryrefslogtreecommitdiffstats
path: root/src/remake/quarantine.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/quarantine.rs
parentf4b0a7c5159d418e22682d2bd7d413fb3587ca7f (diff)
use Automerge as Document instead of AutoCommit
This allows a lot of operations to drop mut.
Diffstat (limited to 'src/remake/quarantine.rs')
-rw-r--r--src/remake/quarantine.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/remake/quarantine.rs b/src/remake/quarantine.rs
index 5300f54..3ad5005 100644
--- a/src/remake/quarantine.rs
+++ b/src/remake/quarantine.rs
@@ -5,7 +5,7 @@
//! * `GET /admin/quarantine/{id}` shows the writes: every changed path with the value
//! the old document's merged view holds there (`deleted` if none).
//! * `GET /admin/quarantine/{id}/document` downloads the old document
-//! (`AutoCommit::save()`), for inspection with other tools.
+//! (`Document::save()`), for inspection with other tools.
//! * `POST /admin/quarantine/{id}/replay` writes them into the current epoch anyway (as
//! fresh writes, so they win over what is there) and removes the entry.
//! * `DELETE /admin/quarantine/{id}` discards the entry.
@@ -14,7 +14,7 @@
use std::convert::Infallible;
-use automerge::AutoCommit;
+use crate::document::Document;
use axum::{
Json,
extract::{Path, State},
@@ -69,7 +69,7 @@ pub(super) fn add<H: Host>(
host: &H,
epoch: Epoch,
target: Epoch,
- document: &AutoCommit,
+ document: &Document,
quarantined: Vec<(Vec<String>, String)>,
) -> Option<String> {
if quarantined.is_empty() {
@@ -132,7 +132,7 @@ pub(crate) async fn get<H: Host>(State(host): State<H>, Path(id): Path<String>)
}
pub(crate) async fn document<H: Host>(State(host): State<H>, Path(id): Path<String>) -> Response {
- let Some(mut document) = host
+ let Some(document) = host
.remake()
.with_quarantined(&id, |entry| entry.document.clone())
else {