daemon: rustfmt the changed lines
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
b1fa30da86
commit
f90c8d6f6e
1 changed files with 8 additions and 5 deletions
|
|
@ -1390,9 +1390,10 @@ impl MirrorStore {
|
|||
fn documents(&mut self) -> Result<Vec<CacheDocument>> {
|
||||
let mut documents = Vec::new();
|
||||
for envelope in self.store.pull_all()? {
|
||||
let value = cultcache_rs::decode_payload::<Value>(&envelope.payload).with_context(|| {
|
||||
format!("failed to decode {} at {}", envelope.r#type, envelope.key)
|
||||
})?;
|
||||
let value =
|
||||
cultcache_rs::decode_payload::<Value>(&envelope.payload).with_context(|| {
|
||||
format!("failed to decode {} at {}", envelope.r#type, envelope.key)
|
||||
})?;
|
||||
documents.push(CacheDocument {
|
||||
key: envelope.key,
|
||||
value,
|
||||
|
|
@ -3344,8 +3345,10 @@ mod tests {
|
|||
let temp = tempfile::tempdir()?;
|
||||
let path = temp.path().join("store.ccmp");
|
||||
let receipt = json!({"schema": "brokkr.sync.receipt.v0", "status": "ok"});
|
||||
SingleFileMessagePackBackingStore::new(&path)
|
||||
.push(&raw_envelope("sync/receipts/json", serde_json::to_vec(&receipt)?))?;
|
||||
SingleFileMessagePackBackingStore::new(&path).push(&raw_envelope(
|
||||
"sync/receipts/json",
|
||||
serde_json::to_vec(&receipt)?,
|
||||
))?;
|
||||
let message = format!("{:#}", MirrorStore::open(&path)?.documents().unwrap_err());
|
||||
assert!(message.contains("sync/receipts/json"), "{message}");
|
||||
Ok(())
|
||||
|
|
|
|||
Loading…
Reference in a new issue