Kixunil / configure_me

A Rust library for processing application configuration easily
62 stars 14 forks source link

Clippy: enum with no variants (clippy:empty-enum) in generated code #16

Open akloboucnik opened 5 years ago

akloboucnik commented 5 years ago

Clippy with -- -W clippy::pedantic produces $subj error on generated code if no env_prefix is configured

Clippy output:


    Checking configure_me_user v0.1.0 (<path>/configure_me_user)
warning: enum with no variants
  --> <path>/configure_me_user/target/debug/build/configure_me_user-72c791d01889789c/out/configure_me_config.rs:46:1
   |
46 | pub enum EnvParseError {}
   | ^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: `-W clippy::empty-enum` implied by `-W clippy::pedantic`
help: consider using the uninhabited type `!` or a wrapper around it
  --> <path>/configure_me_user/target/debug/build/configure_me_user-72c791d01889789c/out/configure_me_config.rs:46:1
   |
46 | pub enum EnvParseError {}
   | ^^^^^^^^^^^^^^^^^^^^^^^^^
   = help: for further information visit https://rust-lang-nursery.github.io/rust-clippy/master/index.html#empty_enum