Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enforce ResourceReader errors to be Send + Sync #206

Merged
merged 1 commit into from
Mar 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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