choreL fix triple construction error

pull/795/head
Jesse Wright 1 year ago
parent c22baf3f4c
commit 1c72e116b8
  1. 3
      lib/oxrdf/src/cast_error.rs
  2. 2
      lib/oxrdf/src/lib.rs

@ -22,6 +22,7 @@ impl From<TryFromTermError> for Term {
pub struct TripleConstructionError {
pub(crate) subject: Result<Subject, TryFromTermError>,
pub(crate) predicate: Result<NamedNode, TryFromTermError>,
#[allow(dead_code)]
pub(crate) object: Term,
}
@ -31,7 +32,7 @@ impl fmt::Display for TripleConstructionError {
(Some(e), Some(e2)) => write!(f, "subject: [{}], predicate: [{}]", e, e2),
(Some(e), _) => write!(f, "subject: [{}]", e),
(_, Some(e)) => write!(f, "predicate: [{}]", e),
_ => write!(f, "object: {}", self.object),
_ => write!(f, "No Errors"),
}
}
}

@ -17,7 +17,7 @@ mod variable;
pub mod vocab;
pub use crate::blank_node::{BlankNode, BlankNodeIdParseError, BlankNodeRef};
pub use crate::cast_error::TryFromTermError;
pub use crate::cast_error::{TryFromTermError, TripleConstructionError};
pub use crate::dataset::Dataset;
pub use crate::graph::Graph;
pub use crate::literal::{Literal, LiteralRef};

Loading…
Cancel
Save