mirror of
https://github.com/FyroxEngine/Fyrox.git
synced 2026-10-12 02:02:20 +00:00
fix/suppress clippy warnings
This commit is contained in:
@@ -453,10 +453,17 @@ impl<F: EntityGetter> AddOrRemoveHashMapEntryCommand<F> {
|
||||
let entity = some_or_return!((self.entity_getter)(ctx));
|
||||
entity.resolve_path_mut(&self.path, &mut |result| match result {
|
||||
Ok(entity) => match entity.as_hash_map_mut() {
|
||||
Some(hash_map) => if let Ok(_) = hash_map.reflect_insert(
|
||||
self.key.try_clone_box().expect("the key must be cloneable"),
|
||||
self.value.take().unwrap(),
|
||||
) {},
|
||||
Some(hash_map) => {
|
||||
if hash_map
|
||||
.reflect_insert(
|
||||
self.key.try_clone_box().expect("the key must be cloneable"),
|
||||
self.value.take().unwrap(),
|
||||
)
|
||||
.is_err()
|
||||
{
|
||||
err!("cannot insert in the hash map")
|
||||
}
|
||||
}
|
||||
None => {
|
||||
err!("not a hash map")
|
||||
}
|
||||
|
||||
@@ -18,6 +18,8 @@
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
// SOFTWARE.
|
||||
|
||||
#![allow(clippy::type_complexity)]
|
||||
|
||||
use crate::reflect::blank_reflect;
|
||||
use crate::reflect::Reflect;
|
||||
use std::collections::HashMap;
|
||||
|
||||
Reference in New Issue
Block a user