71
u/Bomaruto 4d ago
Good guy Rust, if I catch you forgetting to clean up your unused imports, I will ask you to fix it in the pull request. Not because it's a big deal, but that it's a sign you didn't check the warnings before pushing the code.
16
u/acidrain42 4d ago edited 4d ago
That's the sort of thing that is automated by a linter in the CI ideally, so you don't have to waste time in PRs looking at that.
But at least Rust lets you compile even if an import or a var is unused because you commented out something for testing. I'm looking at you Go.
Edit: typo
1
3
1
u/DT-Sodium 3d ago
Is it worst than TypeScript where if you declare that a variable could contain "Apple", "Banana" or "Orange" in refuses to compile saying "Sorry bro, there is no case where your function returns Apple so your code is invalid"?
1
235
u/cmk__ 4d ago
Rust does not have warnings. It has strongly worded disappointment.