Skip to content

Commit

Permalink
chore: restore summarize_manifest_store due to feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
gpeacock committed Feb 18, 2025
1 parent a3b7a6c commit f62bff0
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions cawg_identity/src/identity_assertion/assertion.rs
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,8 @@ impl IdentityAssertion {
///
/// [`ManifestStore`]: c2pa::ManifestStore
#[cfg(feature = "v1_api")]
pub async fn summarize_reader<SV: SignatureVerifier>(
reader: &c2pa::Reader,
pub async fn summarize_manifest_store<SV: SignatureVerifier>(
store: &c2pa::ManifestStore,
verifier: &SV,
) -> impl Serialize {
// NOTE: We can't write this using .map(...).collect() because there are async
Expand All @@ -174,7 +174,7 @@ impl IdentityAssertion {
>,
> = BTreeMap::new();

for (id, manifest) in reader.manifests() {
for (id, manifest) in store.manifests() {
let report = Self::summarize_all_impl(manifest, verifier).await;
reports.insert(id.clone(), report);
}
Expand All @@ -200,13 +200,9 @@ impl IdentityAssertion {
>,
> = BTreeMap::new();

for manifest in reader.iter_manifests() {
for (id, manifest) in reader.manifests() {
let report = Self::summarize_all_impl(manifest, verifier).await;

// TO DO: What to do if manifest doesn't have a label?
if let Some(label) = manifest.label() {
reports.insert(label.to_owned(), report);
}
reports.insert(id.clone(), report);
}

IdentityAssertionsForManifestStore::<
Expand Down

0 comments on commit f62bff0

Please sign in to comment.