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

Add Send + Sync bound to load result. #5

Merged
merged 1 commit into from
Jan 19, 2023

Conversation

bjadamson
Copy link
Contributor

@bjadamson bjadamson commented Mar 14, 2021

Hello! Thank you for making this crate, I have been using it to make a game for the past several months.

I integrated the anyhow crate into my project, and after reading this thread I learned I needed to convert the Box returned by easy_gltf::load by adding the Sync + Send bounds to allow the conversion to happen.

With this change I am now able to convert the Box<dyn std::error::Error> returned from easy_gltf::load into a anyhow::Result<T, E>

let scenes = easy_gltf::load(path).map_err(|e| anyhow!(e))?;

Without this change I am unable to figure out another way. I've only been using rust for a few months now, so it's totally possible I don't understand something. Thanks

@flomonster flomonster merged commit 8cef19c into flomonster:master Jan 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants