Clippy fixes and documentation
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -5,6 +5,7 @@ use anyhow_ext::{ensure, Result};
|
||||
use indexmap::IndexMap;
|
||||
use parking_lot::RwLock;
|
||||
use std::fmt::Debug;
|
||||
use std::ops::Deref;
|
||||
use std::sync::Arc;
|
||||
|
||||
/// A library of all natures that can be used, stored by their names.
|
||||
@@ -64,7 +65,7 @@ impl NatureLibrary for NatureLibraryImpl {
|
||||
for kv in read_lock.iter() {
|
||||
// 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 Arc::ptr_eq(&kv.1, nature) {
|
||||
if kv.1.eq(nature.deref()) {
|
||||
return Ok(kv.0.clone());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user