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

"warning: unused imports: DisplayWidth, `TextCellContents'" #1024

Open
hellishvictor opened this issue Jun 14, 2024 · 6 comments
Open

"warning: unused imports: DisplayWidth, `TextCellContents'" #1024

hellishvictor opened this issue Jun 14, 2024 · 6 comments

Comments

@hellishvictor
Copy link

Here on Win 7 x64 building i686 and x86_64 with pc-windows-msvc v1.77.2 it shows the following:

warning: unused imports: `DisplayWidth`, `TextCellContents`
 --> src\output\mod.rs:2:22
  |
2 | pub use self::cell::{DisplayWidth, TextCell, TextCellContents};
  |                      ^^^^^^^^^^^^            ^^^^^^^^^^^^^^^^
  |
note: the lint level is defined here
 --> src\main.rs:7:9
  |
7 | #![warn(unused)]
  |         ^^^^^^
  = note: `#[warn(unused_imports)]` implied by `#[warn(unused)]`

warning: unused import: `self::octal::Render as OctalPermissionsRender`
  --> src\output\render\mod.rs:43:9
   |
43 | pub use self::octal::Render as OctalPermissionsRender;
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

warning: `eza` (bin "eza") generated 2 warnings (run `cargo fix --bin "eza"` to apply 2 suggestions)

Cheers.

@hellishvictor hellishvictor changed the title ci: warning: unused imports: DisplayWidth, `TextCellContents Jun 15, 2024
@hellishvictor hellishvictor changed the title warning: unused imports: DisplayWidth, `TextCellContents warning: unused imports: DisplayWidth, `TextCellContents' Jun 15, 2024
@hellishvictor hellishvictor changed the title warning: unused imports: DisplayWidth, `TextCellContents' "warning: unused imports: DisplayWidth, `TextCellContents'" Jun 15, 2024
@PThorpe92
Copy link
Member

Damn I don't believe there is a way to specify that those need to be solely for windows > 7, so because we have had so many issues with these particular imports we might have to add #[allow(unused_imports)] for this one.

thoughts @gierens @MartinFillon

@daviessm
Copy link
Contributor

daviessm commented Jun 15, 2024

Personally I'd say that Windows <10 build 1507 isn't supported; extended security support for Windows 7 ended four and a half years ago!

https://endoflife.date/windows

@hellishvictor
Copy link
Author

And the next year gonna be the end of life of Win 10, which is a real spyware meant to collect data on your activity and usage and send it back to Microsoft. On my Win 7 there's not ads or whatever that force me to update, and after of all these years it works rock solid. Here is lots of awesome developers like schollz that still support the users, with targets {x86_64,i686}-win7-windows-msvc.

As another user said:
"Microsoft is a commercial company, so its decisions are dictated by profit. If the support does not promise profit, it will be canceled. It says nothing about the tool. A good hammer continues to hammer regardless of whether the warranty has expired. Microsoft calls it obsolete so that people get scared and run to spend money, and not because there is something revolutionary new in the new OSes (like 64-bit, NTFS instead of FAT32, and the ability to work with more than 4 GB RAM). This trick of capitalism is called planned obsolescence. But there are many users, especially outside relatively well-off places, who can't upgrade or don't care about support, because Windows 7 works properly without it. And I doubt there are any features in your Whois program that require a new OS — after all it's a simple network exchange, so it's a pity that you give up so easily and turn a blind eye to people’s pain."

@hellishvictor
Copy link
Author

sharkdp/fd#1550

@daviessm
Copy link
Contributor

@hellishvictor if you'd like to provide patches to keep Windows 7 builds working without breaking any others, we're willing to review and include them!

@MartinFillon
Copy link
Contributor

Damn I don't believe there is a way to specify that those need to be solely for windows > 7

Personally don't know anyway to do that.

because we have had so many issues with these particular imports we might have to add #[allow(unused_imports)] for this one.

The thing is that, technically its used because it is a reexport, but it is not used directly so depending on your rust implementation it will change. I personally think that reexports like that are not a great idea and you must always specify what you need, if possible in its most raw version. But I am not against some #[allow(unused_imports)] if needed

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

No branches or pull requests

4 participants