cultnet-rs: fix decode_door credential test and unused import

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Meta Vens 2026-10-16 00:34:55 +02:00
commit a38768202a
2 changed files with 4 additions and 2 deletions

View file

@ -1,4 +1,3 @@
use anyhow::Context;
use anyhow::Result;
use anyhow::anyhow;
use cultcache_rs::CultCache;

View file

@ -333,7 +333,10 @@ fn identity_credential_with_deep_key_is_refused_on_a_small_thread() {
let path = temp.path().join("identity.cc");
enroll_service_identity_at::<IdunnServiceIdentity>(&path).unwrap();
let mut envelopes: rmpv::Value = rmp_serde::from_slice(&std::fs::read(path).unwrap()).unwrap();
let rmpv::Value::Map(envelope) = &mut envelopes.as_array_mut().unwrap()[0] else {
let rmpv::Value::Array(items) = &mut envelopes else {
panic!("credential is an array");
};
let rmpv::Value::Map(envelope) = &mut items[0] else {
panic!("envelope is a map");
};
envelope.push(("zz".into(), "DEEP".into()));