Fixes a bunch of clippy warnings, adds clippy to CI
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2022-06-18 16:06:54 +02:00
parent 5576bc8b80
commit c99b1bf8d9
14 changed files with 42 additions and 27 deletions

View File

@@ -68,7 +68,7 @@ impl NatureLibrary {
for kv in &self.map {
// As natures can't be copied, and should always be the same reference as the value
// in the map, we just compare by reference.
if (kv.1 as *const Nature) == (nature as *const Nature) {
if std::ptr::eq(kv.1, nature) {
return kv.0.clone();
}
}