diff --git a/lib/oxrdf/src/triple.rs b/lib/oxrdf/src/triple.rs index c0328f46..850b1375 100644 --- a/lib/oxrdf/src/triple.rs +++ b/lib/oxrdf/src/triple.rs @@ -853,10 +853,11 @@ impl<'a> From> for Triple { /// A possible owned graph name. /// It is the union of [IRIs](https://www.w3.org/TR/rdf11-concepts/#dfn-iri), [blank nodes](https://www.w3.org/TR/rdf11-concepts/#dfn-blank-node), and the [default graph name](https://www.w3.org/TR/rdf11-concepts/#dfn-default-graph). -#[derive(Eq, PartialEq, Debug, Clone, Hash)] +#[derive(Eq, PartialEq, Debug, Clone, Hash, Default)] pub enum GraphName { NamedNode(NamedNode), BlankNode(BlankNode), + #[default] DefaultGraph, } @@ -940,10 +941,11 @@ impl From> for GraphName { /// A possible borrowed graph name. /// It is the union of [IRIs](https://www.w3.org/TR/rdf11-concepts/#dfn-iri), [blank nodes](https://www.w3.org/TR/rdf11-concepts/#dfn-blank-node), and the [default graph name](https://www.w3.org/TR/rdf11-concepts/#dfn-default-graph). -#[derive(Eq, PartialEq, Debug, Clone, Copy, Hash)] +#[derive(Eq, PartialEq, Debug, Clone, Copy, Hash, Default)] pub enum GraphNameRef<'a> { NamedNode(NamedNodeRef<'a>), BlankNode(BlankNodeRef<'a>), + #[default] DefaultGraph, } diff --git a/lib/spargebra/src/term.rs b/lib/spargebra/src/term.rs index 8c41fc1b..6a33294c 100644 --- a/lib/spargebra/src/term.rs +++ b/lib/spargebra/src/term.rs @@ -183,9 +183,10 @@ impl TryFrom for GroundTriple { /// A possible graph name. /// /// It is the union of [IRIs](https://www.w3.org/TR/rdf11-concepts/#dfn-iri) and the [default graph name](https://www.w3.org/TR/rdf11-concepts/#dfn-default-graph). -#[derive(Eq, PartialEq, Debug, Clone, Hash)] +#[derive(Eq, PartialEq, Debug, Clone, Hash, Default)] pub enum GraphName { NamedNode(NamedNode), + #[default] DefaultGraph, }