Skip to content

Commit

Permalink
Enforce ResourceReader errors to be Send + Sync (#206)
Browse files Browse the repository at this point in the history
  • Loading branch information
aleokdev committed Mar 28, 2022
1 parent e176b4b commit 286e461
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ pub enum Error {
/// The path to the file that was unable to be opened.
path: PathBuf,
/// The error that occured when trying to open the file.
err: Box<dyn std::error::Error>,
err: Box<dyn std::error::Error + Send + Sync + 'static>,
},
/// There was an invalid tile in the map parsed.
InvalidTileFound,
Expand Down
2 changes: 1 addition & 1 deletion src/loader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ pub trait ResourceReader {
type Resource: Read;
/// The type that is returned if [`read_from()`](Self::read_from()) fails. For example, for
/// [`FilesystemResourceReader`], this is defined as [`std::io::Error`].
type Error: std::error::Error + 'static;
type Error: std::error::Error + Send + Sync + 'static;

/// Try to return a reader object from a path into the resources filesystem.
fn read_from(&mut self, path: &Path) -> std::result::Result<Self::Resource, Self::Error>;
Expand Down

0 comments on commit 286e461

Please sign in to comment.