diff options
| author | tv <tv@krebsco.de> | 2026-11-08 23:23:41 +0000 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-11-09 00:24:37 +0100 |
| commit | 667a9e7cf40664b34fcb9ad73ad468dd2aa96cf9 (patch) | |
| tree | b98d826e8c8890e99e7cd7ecdec1a8967395b347 | |
| parent | 604f1be24443a2bd9b320d6f689487427fbffa4c (diff) | |
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.
| -rw-r--r-- | src/document/changes.rs | 3 |
1 files changed, 2 insertions, 1 deletions
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}"); } |
