aboutsummaryrefslogtreecommitdiffstats
path: root/src/state/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/state/mod.rs')
-rw-r--r--src/state/mod.rs19
1 files changed, 0 insertions, 19 deletions
diff --git a/src/state/mod.rs b/src/state/mod.rs
index 673bd56..8ac1124 100644
--- a/src/state/mod.rs
+++ b/src/state/mod.rs
@@ -394,25 +394,6 @@ impl AppState {
.expect("document read task panicked")
}
- /// Mutates the document on the blocking pool.
- pub(crate) async fn write_doc<T>(
- &self,
- f: impl FnOnce(&mut Document) -> T + Send + 'static,
- ) -> T
- where
- T: Send + 'static,
- {
- let doc = Arc::clone(&self.doc);
- tokio::task::spawn_blocking(move || {
- let mut replica = doc.blocking_write();
- let out = f(&mut replica.doc);
- replica.refresh_heads();
- out
- })
- .await
- .expect("document write task panicked")
- }
-
/// Mutates the document on the blocking pool as one change, then
/// publishes it. Write and notification run in the same blocking task, so a
/// cancelled request can't leave a committed write unannounced.