Skip to content

Commit

Permalink
Merge pull request #48 from nextdotid/feature/neighbor-sources
Browse files Browse the repository at this point in the history
fix: return adjacent proof sources
  • Loading branch information
nykma authored Aug 24, 2022
2 parents 0282af8 + f29f441 commit fbef20e
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/graph/vertex/identity.rs
Original file line number Diff line number Diff line change
Expand Up @@ -458,18 +458,13 @@ impl IdentityRecord {
let path: Path = from_value(p)?;

let last = path.vertices.last().unwrap().to_owned();
let last_edge = path.edges.last().unwrap().to_owned();
let key = last.id().to_string();
let sources: Vec<String> = path
.edges
.into_iter()
.map(|e| e.source.to_string())
.collect();

identity_map.entry(key.clone()).or_insert(last);
sources_map
.entry(key.clone())
.or_insert_with(|| Vec::new())
.extend(sources)
.push(last_edge.source.to_string());
}

let mut identity_sources: Vec<IdentityWithSource> = Vec::new();
Expand Down

0 comments on commit fbef20e

Please sign in to comment.