Skip to content
This repository has been archived by the owner on Sep 13, 2023. It is now read-only.

Remove failure rexports #67

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mistydemeo
Copy link

Based on what I found in studio-lucia/sss_fontbuild#2, it looks like it's not possible to use the failure/failure_derive reexports from the prelude; it seems to be necessary to independently import those crates anyway. As a result, there doesn't seem to really be a reason to reexport them.

I also removed the failure_derive import in this module, since it's not used internally either.

@killercup
Copy link
Owner

Thanks!

Yeah, failure-derive requires and explicit extern crate failure; to be possible it seems, and that's only the case when you have the crate added to your dependencies. Let's get rid of it.

I think we can use the failure macros, though, if we also re-export the functions they use.

And speaking of failure macros, CI fails with

error: cannot find macro `format_err!` in this scope
  --> examples/thumbnails/src/main.rs:38:24
   |
38 |         .ok_or_else(|| format_err!("couldn't read file name of {:?}", original))?;
   |                        ^^^^^^^^^^ help: you could try the macro: `format_args!`

because we use one of those in the thumbnails guide! :) We could alternatively use with_context here, another thing failure exports which I want to keep.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants