rust-sysbar icon indicating copy to clipboard operation
rust-sysbar copied to clipboard

Clippy Warning: SysbarImpl is used but is an undeclared type or module

Open pranitbauva1997 opened this issue 5 years ago • 3 comments

On including this package as a dependency in our project, we get this warning from clippy (which is configured to run as a pre-commit hook):

error[E0433]: failed to resolve: use of undeclared type or module `SysbarImpl`
  --> /home/amit_project/Code/amitu_heroku/.cargo/registry/src/github.com-1ecc6299db9ec823/sysbar-0.2.0/src/lib.rs:12:16
   |
12 |         Sysbar(SysbarImpl::new(name))
   |                ^^^^^^^^^^ use of undeclared type or module `SysbarImpl`

error[E0412]: cannot find type `SysbarImpl` in this scope
 --> /home/amit_project/Code/amitu_heroku/.cargo/registry/src/github.com-1ecc6299db9ec823/sysbar-0.2.0/src/lib.rs:8:19
  |
8 | pub struct Sysbar(SysbarImpl);
  |                   ^^^^^^^^^^ not found in this scope

error: aborting due to 2 previous errors

Some errors have detailed explanations: E0412, E0433.
For more information about an error, try `rustc --explain E0412`.
error: could not compile `sysbar`.

pranitbauva1997 avatar Jun 16 '20 09:06 pranitbauva1997

do you only get this error when running clippy?

frewsxcv avatar Jun 20 '20 21:06 frewsxcv

@frewsxcv Yes and not when I build the project. This piece of code is inside a block which executes only on Mac OS while I am running Ubuntu.

pranitbauva1997 avatar Jun 22 '20 13:06 pranitbauva1997

ah weird. well this library currently only supports macOS. there's a separate issue for linux support here https://github.com/rust-sysbar/rust-sysbar/issues/3

frewsxcv avatar Jun 23 '20 03:06 frewsxcv