Skip to content

Commit

Permalink
Use string interning when parsing AnonymousIndividual
Browse files Browse the repository at this point in the history
  • Loading branch information
althonos committed Feb 26, 2024
1 parent 61c27c8 commit d73dc1b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/from_pair.rs
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,8 @@ impl<A: ForIRI> FromPair<A> for Individual<A> {
impl<A: ForIRI> FromPair<A> for AnonymousIndividual<A> {
const RULE: Rule = Rule::NodeID;
fn from_pair_unchecked(pair: Pair<Rule>, _ctx: &Context<'_, A>) -> Result<Self> {
Ok(AnonymousIndividual(pair.as_str().to_string().into()))
let iri = ctx.iri(pair.as_str());

Check failure on line 582 in src/from_pair.rs

View workflow job for this annotation

GitHub Actions / Test (stable, default)

cannot find value `ctx` in this scope

Check failure on line 582 in src/from_pair.rs

View workflow job for this annotation

GitHub Actions / Test (beta, default)

cannot find value `ctx` in this scope
Ok(AnonymousIndividual(iri.underlying()))
}
}

Expand Down

0 comments on commit d73dc1b

Please sign in to comment.