eza-community / eza

A modern alternative to ls
https://eza.rocks
European Union Public License 1.2
11.41k stars 205 forks source link

fix: change windows-only imports to be windows-only #944

Closed VlkrS closed 4 months ago

VlkrS commented 5 months ago

Apparently this line is required for the Windows build, but leads to warnings on systems that build the eza port with a port of rust 1.77.2, which at this time seems to be limited to the BSDs.

Rather than selectively suppress the warning, I suggest to only include this line where needed.

fraggerfox commented 5 months ago

This fix looks more correct than individually ignoring the BSDs, thank you for the fix.

Out of curiosity, how come this conditional inclusion did not affect linux / macos builds and only BSD builds were having the warning in the first place?

PThorpe92 commented 5 months ago

Thanks for the fix!

Could you edit your commit msg to conform to conventional commits? Then we are all set to merge :+1:

VlkrS commented 5 months ago

Sure, I hope that one works :-)

VlkrS commented 5 months ago

This fix looks more correct than individually ignoring the BSDs, thank you for the fix.

Out of curiosity, how come this conditional inclusion did not affect linux / macos builds and only BSD builds were having the warning in the first place?

I assume it's because Linux and MacOS builds were using the rust version from Cargo.toml (1.70.0) and only the BSD ports were at 1.77.2 already...

cafkafk commented 4 months ago

Thanks for the contribution! :tada: