From c8ec3e4f87e91818d3978991e2140248610a09f3 Mon Sep 17 00:00:00 2001 From: Pierre-Antoine Champin Date: Fri, 29 Nov 2024 15:29:22 +0100 Subject: [PATCH] pleasing `cargo fmt` after upgrading to 1.83 --- api/src/dataset.rs | 15 ++++++++++--- api/src/dataset/_foreign_impl.rs | 30 ++++++++++++++++++++----- api/src/dataset/adapter.rs | 5 ++++- api/src/graph.rs | 15 ++++++++++--- api/src/graph/_foreign_impl.rs | 30 ++++++++++++++++++++----- api/src/graph/adapter.rs | 15 ++++++++++--- api/src/ns/_term.rs | 5 ++++- api/src/term.rs | 5 ++++- api/src/term/_cmp.rs | 5 ++++- api/src/term/_native_iri.rs | 10 +++++++-- api/src/term/_native_literal.rs | 5 ++++- api/src/term/_simple.rs | 5 ++++- api/src/term/bnode_id.rs | 5 ++++- api/src/term/var_name.rs | 5 ++++- c14n/src/_c14n_term.rs | 5 ++++- inmem/src/dataset.rs | 10 +++++++-- inmem/src/graph.rs | 10 +++++++-- isomorphism/src/iso_term.rs | 5 ++++- isomorphism/src/test.rs | 5 ++++- jsonld/src/loader_factory.rs | 6 +++-- jsonld/src/parser/adapter.rs | 5 ++++- jsonld/src/vocabulary.rs | 5 ++++- rio/src/model.rs | 35 ++++++++++++++++++++++++------ sparql/src/matcher/_any_pattern.rs | 5 ++++- sparql/src/matcher/_ox2so.rs | 10 +++++++-- sparql/src/term.rs | 5 ++++- term/src/_generic.rs | 5 ++++- term/src/_macro.rs | 5 ++++- 28 files changed, 216 insertions(+), 55 deletions(-) diff --git a/api/src/dataset.rs b/api/src/dataset.rs index ac7c9b80..ed72fb12 100644 --- a/api/src/dataset.rs +++ b/api/src/dataset.rs @@ -645,7 +645,10 @@ mod check_implementability { } impl Dataset for MyDataset { - type Quad<'x> = [SimpleTerm<'x>; 4] where Self: 'x; + type Quad<'x> + = [SimpleTerm<'x>; 4] + where + Self: 'x; type Error = std::convert::Infallible; fn quads(&self) -> impl Iterator>> + '_ { @@ -691,7 +694,10 @@ mod check_implementability_lazy_term { } impl<'a> Term for MyTerm<'a> { - type BorrowTerm<'x> = MyTerm<'x> where Self: 'x; + type BorrowTerm<'x> + = MyTerm<'x> + where + Self: 'x; fn kind(&self) -> crate::term::TermKind { if let Atom(t) = &self.dataset.terms[self.index] { @@ -770,7 +776,10 @@ mod check_implementability_lazy_term { } impl Dataset for MyDataset { - type Quad<'x> = [MyTerm<'x>; 4] where Self: 'x; + type Quad<'x> + = [MyTerm<'x>; 4] + where + Self: 'x; type Error = std::convert::Infallible; fn quads(&self) -> impl Iterator>> + '_ { diff --git a/api/src/dataset/_foreign_impl.rs b/api/src/dataset/_foreign_impl.rs index c97d4cf5..b6686bf1 100644 --- a/api/src/dataset/_foreign_impl.rs +++ b/api/src/dataset/_foreign_impl.rs @@ -13,7 +13,10 @@ use std::hash::{BuildHasher, Hash}; // reference to Dataset impl<'a, T: Dataset + ?Sized> Dataset for &'a T { - type Quad<'x> = T::Quad<'x> where Self: 'x; + type Quad<'x> + = T::Quad<'x> + where + Self: 'x; type Error = T::Error; @@ -89,7 +92,10 @@ impl<'a, T: Dataset + ?Sized> Dataset for &'a T { // NB: this one is required so that &'a mut T can also implement MutableDataset impl<'a, T: Dataset + ?Sized> Dataset for &'a mut T { - type Quad<'x> = T::Quad<'x> where Self: 'x; + type Quad<'x> + = T::Quad<'x> + where + Self: 'x; type Error = T::Error; @@ -255,7 +261,10 @@ impl MutableDataset for &mut T { impl Dataset for [Q] { type Error = Infallible; - type Quad<'x> = Spog> where Self: 'x; + type Quad<'x> + = Spog> + where + Self: 'x; fn quads(&self) -> impl Iterator>> + '_ { self.iter().map(Quad::spog).map(Ok) @@ -266,7 +275,10 @@ impl Dataset for [Q] { impl Dataset for Vec { type Error = Infallible; - type Quad<'x> = Spog> where Self: 'x; + type Quad<'x> + = Spog> + where + Self: 'x; fn quads(&self) -> impl Iterator>> + '_ { self[..].quads() @@ -427,7 +439,10 @@ where impl Dataset for HashSet { type Error = Infallible; - type Quad<'x> = Spog> where Self: 'x; + type Quad<'x> + = Spog> + where + Self: 'x; fn quads(&self) -> impl Iterator>> + '_ { self.iter().map(Quad::spog).map(Ok) @@ -579,7 +594,10 @@ impl SetDataset for HashSet {} /// nor other methods. impl Dataset for BTreeSet { type Error = Infallible; - type Quad<'x> = Spog> where Self: 'x; + type Quad<'x> + = Spog> + where + Self: 'x; fn quads(&self) -> impl Iterator>> + '_ { self.iter().map(Quad::spog).map(Ok) diff --git a/api/src/dataset/adapter.rs b/api/src/dataset/adapter.rs index f4f01889..663c18d4 100644 --- a/api/src/dataset/adapter.rs +++ b/api/src/dataset/adapter.rs @@ -30,7 +30,10 @@ impl Dataset for GraphAsDataset where T: Graph, { - type Quad<'x> = Spog> where Self: 'x; + type Quad<'x> + = Spog> + where + Self: 'x; type Error = T::Error; fn quads(&self) -> impl Iterator>> + '_ { diff --git a/api/src/graph.rs b/api/src/graph.rs index 64755ee9..f5517aaf 100644 --- a/api/src/graph.rs +++ b/api/src/graph.rs @@ -573,7 +573,10 @@ mod check_implementability { } impl Graph for MyGraph { - type Triple<'x> = [SimpleTerm<'x>; 3] where Self: 'x; + type Triple<'x> + = [SimpleTerm<'x>; 3] + where + Self: 'x; type Error = std::convert::Infallible; fn triples(&self) -> impl Iterator>> + '_ { @@ -620,7 +623,10 @@ mod check_implementability_lazy_term { } impl<'a> Term for MyTerm<'a> { - type BorrowTerm<'x> = MyTerm<'x> where Self: 'x; + type BorrowTerm<'x> + = MyTerm<'x> + where + Self: 'x; fn kind(&self) -> crate::term::TermKind { if let Atom(t) = &self.graph.terms[self.index] { @@ -699,7 +705,10 @@ mod check_implementability_lazy_term { } impl Graph for MyGraph { - type Triple<'x> = [MyTerm<'x>; 3] where Self: 'x; + type Triple<'x> + = [MyTerm<'x>; 3] + where + Self: 'x; type Error = std::convert::Infallible; diff --git a/api/src/graph/_foreign_impl.rs b/api/src/graph/_foreign_impl.rs index 19c570db..5dd89434 100644 --- a/api/src/graph/_foreign_impl.rs +++ b/api/src/graph/_foreign_impl.rs @@ -13,7 +13,10 @@ use std::hash::{BuildHasher, Hash}; // reference to Graph impl<'a, T: Graph + ?Sized> Graph for &'a T { - type Triple<'x> = T::Triple<'x> where Self: 'x; + type Triple<'x> + = T::Triple<'x> + where + Self: 'x; type Error = T::Error; @@ -82,7 +85,10 @@ impl<'a, T: Graph + ?Sized> Graph for &'a T { // NB: this one is required so that &'a mut T can also implement MutableDataset impl<'a, T: Graph + ?Sized> Graph for &'a mut T { - type Triple<'x> = T::Triple<'x> where Self: 'x; + type Triple<'x> + = T::Triple<'x> + where + Self: 'x; type Error = T::Error; @@ -214,7 +220,10 @@ impl<'a, T: MutableGraph + ?Sized> MutableGraph for &'a mut T { impl Graph for [T] { type Error = Infallible; - type Triple<'x> = [TBorrowTerm<'x, T>; 3] where Self: 'x; + type Triple<'x> + = [TBorrowTerm<'x, T>; 3] + where + Self: 'x; fn triples(&self) -> impl Iterator>> + '_ { self.iter().map(Triple::spo).map(Ok) @@ -225,7 +234,10 @@ impl Graph for [T] { impl Graph for Vec { type Error = Infallible; - type Triple<'x> = [TBorrowTerm<'x, T>; 3] where Self: 'x; + type Triple<'x> + = [TBorrowTerm<'x, T>; 3] + where + Self: 'x; fn triples(&self) -> impl Iterator>> + '_ { self[..].triples() @@ -289,7 +301,10 @@ where impl Graph for HashSet { type Error = Infallible; - type Triple<'x> = [TBorrowTerm<'x, T>; 3] where Self: 'x; + type Triple<'x> + = [TBorrowTerm<'x, T>; 3] + where + Self: 'x; fn triples(&self) -> impl Iterator>> + '_ { self.iter().map(Triple::spo).map(Ok) @@ -350,7 +365,10 @@ impl SetGraph for HashSet {} /// nor other methods. impl Graph for BTreeSet { type Error = Infallible; - type Triple<'x> = [TBorrowTerm<'x, T>; 3] where Self: 'x; + type Triple<'x> + = [TBorrowTerm<'x, T>; 3] + where + Self: 'x; fn triples(&self) -> impl Iterator>> + '_ { self.iter().map(Triple::spo).map(Ok) diff --git a/api/src/graph/adapter.rs b/api/src/graph/adapter.rs index dad1f400..7c09b1db 100644 --- a/api/src/graph/adapter.rs +++ b/api/src/graph/adapter.rs @@ -27,7 +27,10 @@ impl UnionGraph { } impl Graph for UnionGraph { - type Triple<'x> = [DTerm<'x, T>; 3] where Self: 'x; + type Triple<'x> + = [DTerm<'x, T>; 3] + where + Self: 'x; type Error = T::Error; fn triples(&self) -> impl Iterator>> + '_ { @@ -115,7 +118,10 @@ impl PartialUnionGraph { } impl Graph for PartialUnionGraph { - type Triple<'x> = [DTerm<'x, D>; 3] where Self: 'x; + type Triple<'x> + = [DTerm<'x, D>; 3] + where + Self: 'x; type Error = D::Error; fn triples(&self) -> impl Iterator>> + '_ { @@ -180,7 +186,10 @@ impl DatasetGraph { } impl Graph for DatasetGraph { - type Triple<'x> = [DTerm<'x, D>; 3] where Self: 'x; + type Triple<'x> + = [DTerm<'x, D>; 3] + where + Self: 'x; type Error = D::Error; fn triples(&self) -> impl Iterator>> + '_ { diff --git a/api/src/ns/_term.rs b/api/src/ns/_term.rs index 39aec0d0..1fd1351f 100644 --- a/api/src/ns/_term.rs +++ b/api/src/ns/_term.rs @@ -47,7 +47,10 @@ impl<'a> NsTerm<'a> { } impl<'a> Term for NsTerm<'a> { - type BorrowTerm<'x> = &'x Self where 'a: 'x; + type BorrowTerm<'x> + = &'x Self + where + 'a: 'x; fn kind(&self) -> TermKind { TermKind::Iri diff --git a/api/src/term.rs b/api/src/term.rs index ba810f3c..95696a54 100644 --- a/api/src/term.rs +++ b/api/src/term.rs @@ -505,7 +505,10 @@ impl<'a, T> Term for &'a T where T: Term = &'a T> + ?Sized, { - type BorrowTerm<'x> = Self where 'a: 'x; + type BorrowTerm<'x> + = Self + where + 'a: 'x; fn kind(&self) -> TermKind { (*self).kind() diff --git a/api/src/term/_cmp.rs b/api/src/term/_cmp.rs index c2fb8d14..bda100b3 100644 --- a/api/src/term/_cmp.rs +++ b/api/src/term/_cmp.rs @@ -6,7 +6,10 @@ use super::*; pub struct CmpTerm(pub T); impl Term for CmpTerm { - type BorrowTerm<'x> = CmpTerm> where T: 'x; + type BorrowTerm<'x> + = CmpTerm> + where + T: 'x; fn kind(&self) -> TermKind { self.0.kind() diff --git a/api/src/term/_native_iri.rs b/api/src/term/_native_iri.rs index 79bf2205..fd504ef6 100644 --- a/api/src/term/_native_iri.rs +++ b/api/src/term/_native_iri.rs @@ -7,7 +7,10 @@ impl Term for Iri where T: Borrow, { - type BorrowTerm<'x> = &'x Self where T: 'x; + type BorrowTerm<'x> + = &'x Self + where + T: 'x; fn kind(&self) -> TermKind { TermKind::Iri @@ -24,7 +27,10 @@ impl Term for IriRef where T: Borrow, { - type BorrowTerm<'x> = &'x Self where T: 'x; + type BorrowTerm<'x> + = &'x Self + where + T: 'x; fn kind(&self) -> TermKind { TermKind::Iri diff --git a/api/src/term/_native_literal.rs b/api/src/term/_native_literal.rs index 2ff4ff82..4c6a6f55 100644 --- a/api/src/term/_native_literal.rs +++ b/api/src/term/_native_literal.rs @@ -171,7 +171,10 @@ impl Term for usize { /// # Ok(()) } /// ``` impl Term for str { - type BorrowTerm<'x> = &'x Self where Self: 'x; + type BorrowTerm<'x> + = &'x Self + where + Self: 'x; fn kind(&self) -> TermKind { TermKind::Literal diff --git a/api/src/term/_simple.rs b/api/src/term/_simple.rs index c30ce263..ddb38acc 100644 --- a/api/src/term/_simple.rs +++ b/api/src/term/_simple.rs @@ -25,7 +25,10 @@ pub enum SimpleTerm<'a> { use SimpleTerm::*; impl<'a> Term for SimpleTerm<'a> { - type BorrowTerm<'x> = &'x Self where 'a: 'x; + type BorrowTerm<'x> + = &'x Self + where + 'a: 'x; fn kind(&self) -> TermKind { match self { diff --git a/api/src/term/bnode_id.rs b/api/src/term/bnode_id.rs index 32b25fcb..5e5f8c8a 100644 --- a/api/src/term/bnode_id.rs +++ b/api/src/term/bnode_id.rs @@ -61,7 +61,10 @@ impl Term for BnodeId where T: Borrow, { - type BorrowTerm<'x> = &'x Self where T: 'x; + type BorrowTerm<'x> + = &'x Self + where + T: 'x; fn kind(&self) -> TermKind { TermKind::BlankNode diff --git a/api/src/term/var_name.rs b/api/src/term/var_name.rs index 1a9c18c1..0aa4a749 100644 --- a/api/src/term/var_name.rs +++ b/api/src/term/var_name.rs @@ -50,7 +50,10 @@ impl Term for VarName where T: Borrow, { - type BorrowTerm<'x> = &'x Self where T: 'x; + type BorrowTerm<'x> + = &'x Self + where + T: 'x; fn kind(&self) -> TermKind { TermKind::Variable diff --git a/c14n/src/_c14n_term.rs b/c14n/src/_c14n_term.rs index d3035e37..70539820 100644 --- a/c14n/src/_c14n_term.rs +++ b/c14n/src/_c14n_term.rs @@ -11,7 +11,10 @@ pub enum C14nTerm { use C14nTerm::{Blank, Other}; impl Term for C14nTerm { - type BorrowTerm<'x> = &'x Self where Self: 'x; + type BorrowTerm<'x> + = &'x Self + where + Self: 'x; fn kind(&self) -> sophia_api::term::TermKind { match self { diff --git a/inmem/src/dataset.rs b/inmem/src/dataset.rs index e537f84b..221a7c7e 100644 --- a/inmem/src/dataset.rs +++ b/inmem/src/dataset.rs @@ -31,7 +31,10 @@ impl GenericLightDataset { } impl Dataset for GenericLightDataset { - type Quad<'x> = Gspo<::BorrowTerm<'x>> where Self: 'x; + type Quad<'x> + = Gspo<::BorrowTerm<'x>> + where + Self: 'x; type Error = TI::Error; fn quads(&self) -> impl Iterator>> + '_ { @@ -221,7 +224,10 @@ impl GenericFastDataset { } impl Dataset for GenericFastDataset { - type Quad<'x> = Gspo<::BorrowTerm<'x>> where Self: 'x; + type Quad<'x> + = Gspo<::BorrowTerm<'x>> + where + Self: 'x; type Error = TI::Error; fn quads(&self) -> impl Iterator>> + '_ { diff --git a/inmem/src/graph.rs b/inmem/src/graph.rs index 27d7310a..623b7e18 100644 --- a/inmem/src/graph.rs +++ b/inmem/src/graph.rs @@ -30,7 +30,10 @@ impl GenericLightGraph { } impl Graph for GenericLightGraph { - type Triple<'x> = [::BorrowTerm<'x>; 3] where Self: 'x; + type Triple<'x> + = [::BorrowTerm<'x>; 3] + where + Self: 'x; type Error = TI::Error; fn triples(&self) -> impl Iterator>> + '_ { @@ -164,7 +167,10 @@ impl GenericFastGraph { } impl Graph for GenericFastGraph { - type Triple<'x> = [::BorrowTerm<'x>; 3] where Self: 'x; + type Triple<'x> + = [::BorrowTerm<'x>; 3] + where + Self: 'x; type Error = TI::Error; fn triples(&self) -> impl Iterator>> + '_ { diff --git a/isomorphism/src/iso_term.rs b/isomorphism/src/iso_term.rs index 976a759d..494019d8 100644 --- a/isomorphism/src/iso_term.rs +++ b/isomorphism/src/iso_term.rs @@ -13,7 +13,10 @@ use std::cmp::{Ordering, PartialOrd}; pub struct IsoTerm(pub(crate) T); impl Term for IsoTerm { - type BorrowTerm<'x> = IsoTerm> where T: 'x; + type BorrowTerm<'x> + = IsoTerm> + where + T: 'x; fn kind(&self) -> TermKind { self.0.kind() diff --git a/isomorphism/src/test.rs b/isomorphism/src/test.rs index 68761a1f..ccee4e1b 100644 --- a/isomorphism/src/test.rs +++ b/isomorphism/src/test.rs @@ -325,7 +325,10 @@ enum MyTerm { } impl Term for MyTerm { - type BorrowTerm<'x> = Self where Self: 'x; + type BorrowTerm<'x> + = Self + where + Self: 'x; fn kind(&self) -> TermKind { match self { diff --git a/jsonld/src/loader_factory.rs b/jsonld/src/loader_factory.rs index 40c36e92..fb37f66f 100644 --- a/jsonld/src/loader_factory.rs +++ b/jsonld/src/loader_factory.rs @@ -59,7 +59,8 @@ where + Sync, L::Error: Display + Send, { - type Loader<'l> = L + type Loader<'l> + = L where Self: 'l; @@ -121,7 +122,8 @@ where L::Error: Display + Send, F: Fn() -> L, { - type Loader<'l> = L + type Loader<'l> + = L where Self: 'l; diff --git a/jsonld/src/parser/adapter.rs b/jsonld/src/parser/adapter.rs index e7b10f80..1988fc64 100644 --- a/jsonld/src/parser/adapter.rs +++ b/jsonld/src/parser/adapter.rs @@ -13,7 +13,10 @@ use crate::vocabulary::{ArcBnode, ArcIri, ArcTag}; pub struct RdfTerm(RdfO); impl SophiaTerm for RdfTerm { - type BorrowTerm<'x> = &'x Self where Self: 'x; + type BorrowTerm<'x> + = &'x Self + where + Self: 'x; fn kind(&self) -> TermKind { match self.0 { diff --git a/jsonld/src/vocabulary.rs b/jsonld/src/vocabulary.rs index 334285ea..4150450e 100644 --- a/jsonld/src/vocabulary.rs +++ b/jsonld/src/vocabulary.rs @@ -129,7 +129,10 @@ impl std::ops::Deref for ArcBnode { } impl Term for ArcBnode { - type BorrowTerm<'x> = BnodeId<&'x str> where Self: 'x; + type BorrowTerm<'x> + = BnodeId<&'x str> + where + Self: 'x; fn kind(&self) -> TermKind { TermKind::BlankNode diff --git a/rio/src/model.rs b/rio/src/model.rs index 64439fd3..dca212c2 100644 --- a/rio/src/model.rs +++ b/rio/src/model.rs @@ -20,7 +20,10 @@ use sophia_api::MownStr; use sophia_iri::{Iri, IriRef}; impl<'a> Term for Trusted> { - type BorrowTerm<'x> = Self where Self: 'x; + type BorrowTerm<'x> + = Self + where + Self: 'x; fn kind(&self) -> TermKind { TermKind::BlankNode @@ -41,7 +44,10 @@ fn bnode_id(b: BlankNode) -> BnodeId { } impl<'a> Term for Trusted> { - type BorrowTerm<'x> = Self where Self: 'x; + type BorrowTerm<'x> + = Self + where + Self: 'x; fn kind(&self) -> TermKind { TermKind::Iri @@ -62,7 +68,10 @@ fn iri(n: NamedNode) -> IriRef { } impl<'a> Term for Trusted> { - type BorrowTerm<'x> = Self where Self: 'x; + type BorrowTerm<'x> + = Self + where + Self: 'x; fn kind(&self) -> TermKind { TermKind::Variable @@ -83,7 +92,10 @@ fn variable(v: Variable) -> VarName { } impl<'a> Term for Trusted> { - type BorrowTerm<'x> = Self where Self: 'x; + type BorrowTerm<'x> + = Self + where + Self: 'x; fn kind(&self) -> TermKind { TermKind::Literal @@ -204,7 +216,10 @@ impl<'a> Term for Trusted> { */ impl<'a> Term for Trusted> { - type BorrowTerm<'x> = Self where Self: 'x; + type BorrowTerm<'x> + = Self + where + Self: 'x; fn kind(&self) -> TermKind { use GraphName::{BlankNode, NamedNode}; @@ -236,7 +251,10 @@ impl<'a> Term for Trusted> { } impl<'a> Term for Trusted> { - type BorrowTerm<'x> = Self where Self: 'x; + type BorrowTerm<'x> + = Self + where + Self: 'x; fn kind(&self) -> TermKind { use RioTerm::{BlankNode, Literal, NamedNode, Triple}; @@ -312,7 +330,10 @@ impl<'a> Term for Trusted> { } impl<'a> Term for Trusted> { - type BorrowTerm<'x> = Self where Self: 'x; + type BorrowTerm<'x> + = Self + where + Self: 'x; fn kind(&self) -> TermKind { use GeneralizedTerm::{BlankNode, Literal, NamedNode, Triple, Variable}; diff --git a/sparql/src/matcher/_any_pattern.rs b/sparql/src/matcher/_any_pattern.rs index d554dd6d..d8ca4ad9 100644 --- a/sparql/src/matcher/_any_pattern.rs +++ b/sparql/src/matcher/_any_pattern.rs @@ -19,7 +19,10 @@ impl<'a> From<&'a NamedNodePattern> for AnyPattern<'a> { } impl<'a> Term for AnyPattern<'a> { - type BorrowTerm<'x> = Self where Self: 'x; + type BorrowTerm<'x> + = Self + where + Self: 'x; fn kind(&self) -> TermKind { match self { diff --git a/sparql/src/matcher/_ox2so.rs b/sparql/src/matcher/_ox2so.rs index cbc6a93c..65399cf1 100644 --- a/sparql/src/matcher/_ox2so.rs +++ b/sparql/src/matcher/_ox2so.rs @@ -18,7 +18,10 @@ impl Ox2So { } impl Term for Ox2So { - type BorrowTerm<'x> = AnyPattern<'x> where Self: 'x; + type BorrowTerm<'x> + = AnyPattern<'x> + where + Self: 'x; fn kind(&self) -> TermKind { match self.0 { @@ -125,7 +128,10 @@ impl Term for Ox2So { } impl Term for Ox2So { - type BorrowTerm<'x> = AnyPattern<'x> where Self: 'x; + type BorrowTerm<'x> + = AnyPattern<'x> + where + Self: 'x; fn kind(&self) -> TermKind { match self.0 { diff --git a/sparql/src/term.rs b/sparql/src/term.rs index 2b7f5624..d46157f7 100644 --- a/sparql/src/term.rs +++ b/sparql/src/term.rs @@ -20,7 +20,10 @@ pub struct ResultTerm { } impl Term for ResultTerm { - type BorrowTerm<'x> = &'x ArcTerm where Self: 'x; + type BorrowTerm<'x> + = &'x ArcTerm + where + Self: 'x; fn kind(&self) -> sophia_api::term::TermKind { self.inner.kind() diff --git a/term/src/_generic.rs b/term/src/_generic.rs index 21d0ccc4..db0f0927 100644 --- a/term/src/_generic.rs +++ b/term/src/_generic.rs @@ -47,7 +47,10 @@ impl> GenericLiteral { } impl + Debug> Term for GenericLiteral { - type BorrowTerm<'x> = &'x Self where Self: 'x; + type BorrowTerm<'x> + = &'x Self + where + Self: 'x; fn kind(&self) -> TermKind { TermKind::Literal diff --git a/term/src/_macro.rs b/term/src/_macro.rs index 42dce4fd..22dd002c 100644 --- a/term/src/_macro.rs +++ b/term/src/_macro.rs @@ -30,7 +30,10 @@ macro_rules! gen_term { } impl Term for $type_name { - type BorrowTerm<'x> = &'x Self where Self: 'x; + type BorrowTerm<'x> + = &'x Self + where + Self: 'x; fn kind(&self) -> sophia_api::term::TermKind { match self {