Moves a bunch of libraries to traits
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:
@@ -24,13 +24,13 @@ pub trait DataLibrary<T: ?Sized> {
|
||||
}
|
||||
|
||||
/// Gets a value from the library.
|
||||
fn get(&self, key: &StringKey) -> Option<&Arc<T>> {
|
||||
self.map().get::<StringKey>(key)
|
||||
fn get(&self, key: &StringKey) -> Option<Arc<T>> {
|
||||
self.map().get::<StringKey>(key).cloned()
|
||||
}
|
||||
|
||||
/// Gets a value from the library.
|
||||
fn get_by_hash(&self, key: u32) -> Option<&Arc<T>> {
|
||||
self.map().get::<u32>(&key)
|
||||
fn get_by_hash(&self, key: u32) -> Option<Arc<T>> {
|
||||
self.map().get::<u32>(&key).cloned()
|
||||
}
|
||||
|
||||
/// Gets a value from the library by the index where it is stored.
|
||||
|
||||
Reference in New Issue
Block a user