mun-lang / mun

Source code for the Mun language and runtime.
https://mun-lang.org
Other
1.89k stars 73 forks source link

Remove instances of `#[allow(clippy::mutable_key_type)]` #573

Open Wodann opened 1 month ago

Wodann commented 1 month ago

Some of the Mun code is violating the clippy::mutable_key_type lint, but cannot be trivially fixed. Refactor the code to prevent this and remove all instances of #[allow(clippy::mutable_key_type)].

wackbyte commented 1 month ago

I say that this is a case of the lint's false positives given that the Hash implementation for Type does not rely on any interior-mutable fields.

(However, changing the keys to perhaps use TypeDataKind directly would probably perform slightly better as the Arc to the data store would not be unnecessarily cloned.)