parent
bdb5efbf5b
commit
37f641f79b
@ -7,7 +7,7 @@ use core::any::{Any, TypeId};
|
|||||||
|
|
||||||
// yolo
|
// yolo
|
||||||
|
|
||||||
/// Get a `type_id` from it's previously unpacked `u64`.
|
/// Get a `type_id` from its previously unpacked `u64`.
|
||||||
/// Opposite of [`unpack_type_id(id)`].
|
/// Opposite of [`unpack_type_id(id)`].
|
||||||
///
|
///
|
||||||
/// # Safety
|
/// # Safety
|
||||||
|
@ -113,10 +113,13 @@ where
|
|||||||
where
|
where
|
||||||
S: HasMetadata,
|
S: HasMetadata,
|
||||||
{
|
{
|
||||||
if state.metadata().get::<CmpValuesMetadata>().is_none() {
|
#[allow(clippy::clippy::option_if_let_else)] // we can't mutate state in a closure
|
||||||
|
let meta = if let Some(meta) = state.metadata_mut().get_mut::<CmpValuesMetadata>() {
|
||||||
|
meta
|
||||||
|
} else {
|
||||||
state.add_metadata(CmpValuesMetadata::new());
|
state.add_metadata(CmpValuesMetadata::new());
|
||||||
}
|
state.metadata_mut().get_mut::<CmpValuesMetadata>().unwrap()
|
||||||
let meta = state.metadata_mut().get_mut::<CmpValuesMetadata>().unwrap();
|
};
|
||||||
meta.list.clear();
|
meta.list.clear();
|
||||||
let count = self.usable_count();
|
let count = self.usable_count();
|
||||||
for i in 0..count {
|
for i in 0..count {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user