Skip to content

Commit

Permalink
Fix implicit lifetime (#181)
Browse files Browse the repository at this point in the history
It broke with Rust 1.78
  • Loading branch information
sbihel authored May 2, 2024
1 parent 90d53f7 commit 44aaf86
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 8 deletions.
6 changes: 4 additions & 2 deletions layouts/src/distill/hy/data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ use xsd_types::{lexical::Lexical, ParseXsd};

use super::{DataFragment, Error, MatchingForFragment};

pub fn hydrate_data<V, I: Interpretation, D>(
pub fn hydrate_data<V, I, D>(
vocabulary: &V,
interpretation: &I,
dataset: &D,
Expand All @@ -27,7 +27,9 @@ pub fn hydrate_data<V, I: Interpretation, D>(
where
V: Vocabulary,
V::Iri: PartialEq,
I: ReverseIriInterpretation<Iri = V::Iri> + ReverseLiteralInterpretation<Literal = V::Literal>,
I: Interpretation
+ ReverseIriInterpretation<Iri = V::Iri>
+ ReverseLiteralInterpretation<Literal = V::Literal>,
I::Resource: Clone + PartialEq,
D: PatternMatchingDataset<Resource = I::Resource>,
{
Expand Down
12 changes: 8 additions & 4 deletions layouts/src/distill/hy/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ where

/// Serialize the given RDF `dataset` using the provided `layout`, returning
/// a typed value.
pub fn hydrate_with<V, I: Interpretation, D>(
pub fn hydrate_with<V, I, D>(
vocabulary: &V,
interpretation: &I,
context: impl LayoutRegistry<I::Resource>,
Expand All @@ -139,7 +139,9 @@ pub fn hydrate_with<V, I: Interpretation, D>(
where
V: Vocabulary,
V::Iri: PartialEq,
I: ReverseIriInterpretation<Iri = V::Iri> + ReverseLiteralInterpretation<Literal = V::Literal>,
I: Interpretation
+ ReverseIriInterpretation<Iri = V::Iri>
+ ReverseLiteralInterpretation<Literal = V::Literal>,
I::Resource: Clone + Ord,
D: PatternMatchingDataset<Resource = I::Resource>,
{
Expand All @@ -154,7 +156,7 @@ where
)
}

fn hydrate_with_ref<V, I: Interpretation, D>(
fn hydrate_with_ref<V, I, D>(
vocabulary: &V,
interpretation: &I,
context: &impl LayoutRegistry<I::Resource>,
Expand All @@ -166,7 +168,9 @@ fn hydrate_with_ref<V, I: Interpretation, D>(
where
V: Vocabulary,
V::Iri: PartialEq,
I: ReverseIriInterpretation<Iri = V::Iri> + ReverseLiteralInterpretation<Literal = V::Literal>,
I: Interpretation
+ ReverseIriInterpretation<Iri = V::Iri>
+ ReverseLiteralInterpretation<Literal = V::Literal>,
I::Resource: Clone + Ord,
D: PatternMatchingDataset<Resource = I::Resource>,
{
Expand Down
4 changes: 2 additions & 2 deletions layouts/src/matching.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ where

impl<'a, 'p, R, D, Q> Matching<'a, 'p, R, D, Q>
where
R: Clone + PartialEq,
R: Clone + PartialEq + 'a,
D: PatternMatchingDataset<Resource = R>,
Q: Clone + Iterator<Item = PatternRefQuad<'p, R>>,
{
Expand All @@ -97,7 +97,7 @@ where

impl<'a, 'p, R, D, Q> Iterator for Matching<'a, 'p, R, D, Q>
where
R: Clone + PartialEq,
R: Clone + PartialEq + 'a,
D: PatternMatchingDataset<Resource = R>,
Q: Clone + Iterator<Item = PatternRefQuad<'p, R>>,
{
Expand Down

0 comments on commit 44aaf86

Please sign in to comment.