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

Make DmError able to be cloned #644

Closed
jbaublitz opened this issue Jun 24, 2021 · 3 comments · Fixed by #671
Closed

Make DmError able to be cloned #644

jbaublitz opened this issue Jun 24, 2021 · 3 comments · Fixed by #671
Assignees

Comments

@jbaublitz
Copy link
Member

Related to straits-storage/stratisd#2664

First, investigate whether this is possible with the error chaining crate. If it is, provide a Clone implementation given that in stratisd, we have a DmError that is part of a lazy_static expression so we cannot move it. It would be preferable to be able to clone it rather that stringifying it and wrapping it as a message.

@jbaublitz jbaublitz self-assigned this Jun 24, 2021
@jbaublitz jbaublitz changed the title Make DmError about to be cloned Make DmError able to be cloned Jun 24, 2021
@jbaublitz
Copy link
Member Author

@mulkieran Please take a look at rust-lang-deprecated/error-chain#134. It appears that we cannot implement Clone for DmError. How would you like me to proceed?

@mulkieran
Copy link
Member

@jbaublitz When you have a chance, look into seeing if we can just drop our dependency on error_chain in devicemapper entirely, as I believe that would solve the problem. But this obstacle should not block stratis-storage/stratisd#2667.

@mulkieran
Copy link
Member

So, dropping dependency on error_chain is not so hard, but std::io::Error is not cloneable. Also, I'ld like to drop fn description implementation for outer error, see #657. So, might as well defer until after next release.

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 a pull request may close this issue.

2 participants