Skip to content

Commit

Permalink
last if dyn Error
Browse files Browse the repository at this point in the history
  • Loading branch information
mkatychev committed Jul 25, 2024
1 parent 2a459e2 commit a69cdae
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
5 changes: 4 additions & 1 deletion iri/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,8 @@ pub use std::error::Error;
pub use ThreadSafeError as Error;

///! An error trait meant to enable sending errors safely across threads.
pub trait ThreadSafeError: std::error::Error + Send + Sync + 'static {}
pub trait ThreadSafeError:
core::fmt::Debug + core::fmt::Display + std::error::Error + Send + Sync + 'static
{
}
impl<E> ThreadSafeError for E where E: std::error::Error + Send + Sync + 'static {}
2 changes: 1 addition & 1 deletion jsonld/src/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ pub trait TryIntoContextRef {
}

impl TryIntoContextRef for &str {
type Error = Box<dyn sophia_api::Error>;
type Error = Box<dyn std::error::Error>;

fn try_into_context_ref(self) -> Result<ContextRef, Self::Error> {
let iri = ArcIri::new_unchecked("x-string://".into());
Expand Down
2 changes: 0 additions & 2 deletions resource/src/resource/_struct.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ use crate::Loader;
use sophia_api::graph::CollectibleGraph;
use sophia_api::ns::rdf;
use sophia_api::term::matcher::Any;
use sophia_api::Error;
use sophia_api::MownStr;
use sophia_api::{prelude::*, term::SimpleTerm};
use sophia_iri::is_absolute_iri_ref;
Expand All @@ -23,7 +22,6 @@ pub struct Resource<G, L> {
impl<G, L> Resource<G, L>
where
G: Graph + 'static,
// G::Error: Error,
L: Loader,
{
/// Constructor
Expand Down

0 comments on commit a69cdae

Please sign in to comment.