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

fix(color_eyre): build warnings #182

Merged
merged 1 commit into from
Jul 3, 2024

Conversation

joshka
Copy link
Contributor

@joshka joshka commented Jun 29, 2024

Remove structs that are unused and have been migrated to use the eyre
versions of the same:

  • color_eyre::config::InstallError -> eyre::InstallError
  • color_eyre::config::InstallThemeError -> eyre::InstallThemeError
  • color_eyre::config::InstallColorSpantraceThemeError -> no equivalent

Add cfg guards to the DisplayExt, FooterWriter, Footer, and Header
to prevent unused warnings when the issue-url feature is not enabled.


Warnings:

   Compiling color-eyre v0.6.2 (/Users/joshka/local/eyre/color-eyre)
warning: struct `InstallError` is never constructed
   --> color-eyre/src/config.rs:15:8
    |
15  | struct InstallError;
    |        ^^^^^^^^^^^^
    |
note: the lint level is defined here
   --> color-eyre/src/lib.rs:352:5
    |
352 |     unused,
    |     ^^^^^^
    = note: `#[warn(dead_code)]` implied by `#[warn(unused)]`

warning: struct `InstallThemeError` is never constructed
  --> color-eyre/src/config.rs:26:8
   |
26 | struct InstallThemeError;
   |        ^^^^^^^^^^^^^^^^^

warning: struct `InstallColorSpantraceThemeError` is never constructed
  --> color-eyre/src/config.rs:37:8
   |
37 | struct InstallColorSpantraceThemeError;
   |        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

warning: trait `DisplayExt` is never used
  --> color-eyre/src/writers.rs:31:18
   |
31 | pub(crate) trait DisplayExt: Sized + Display {
   |                  ^^^^^^^^^^

warning: struct `FooterWriter` is never constructed
  --> color-eyre/src/writers.rs:83:19
   |
83 | pub(crate) struct FooterWriter<W> {
   |                   ^^^^^^^^^^^^

warning: struct `Footer` is never constructed
   --> color-eyre/src/writers.rs:102:19
    |
102 | pub(crate) struct Footer<B, H>
    |                   ^^^^^^

warning: struct `Header` is never constructed
   --> color-eyre/src/writers.rs:133:19
    |
133 | pub(crate) struct Header<B, H>
    |                   ^^^^^^

warning: `color-eyre` (lib) generated 7 warnings

Remove structs that are unused and have been migrated to use the eyre
versions of the same:
- color_eyre::config::InstallError -> eyre::InstallError
- color_eyre::config::InstallThemeError -> eyre::InstallThemeError
- color_eyre::config::InstallColorSpantraceThemeError -> no equivalent

Add cfg guards to the DisplayExt, FooterWriter, Footer, and Header
to prevent unused warnings when the issue-url feature is not enabled.
Copy link
Contributor

@ten3roberts ten3roberts left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you

@ten3roberts ten3roberts merged commit dded7de into eyre-rs:master Jul 3, 2024
29 checks passed
@joshka joshka deleted the jm/fix-warnings branch July 3, 2024 11:54
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.

2 participants