From 667a9e7cf40664b34fcb9ad73ad468dd2aa96cf9 Mon Sep 17 00:00:00 2001 From: tv Date: Sun, 8 Nov 2026 23:23:41 +0000 Subject: changes: Context where it is used Since load_delta is for tests (1190), nothing else in changes.rs uses anyhow's Context, and builds without tests warned of an unused import. load_delta imports it itself. --- src/document/changes.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/document') diff --git a/src/document/changes.rs b/src/document/changes.rs index 031dd0c..fd14a4e 100644 --- a/src/document/changes.rs +++ b/src/document/changes.rs @@ -4,7 +4,7 @@ use std::collections::{HashMap, HashSet}; -use anyhow::{Context, Result, anyhow, bail}; +use anyhow::{Result, anyhow, bail}; use super::{Change, ChangeHash, Document, ReadDoc}; @@ -173,6 +173,7 @@ pub(crate) fn delta_bytes( /// downloads (`access::screen::apply_bytes`). #[cfg(test)] pub(crate) fn load_delta(doc: &mut Document, bytes: &[u8]) -> Result<()> { + use anyhow::Context as _; if let Some(misplaced) = misplaced_author(bytes) { bail!("Refused the downloaded changes: {misplaced}"); } -- cgit v1.3.1