Test update, repo update

This commit is contained in:
micialware committed 2026-08-27 09:21:16 +03:00
1 parent 0326b56ded
commit 0f2090af77
3 files changed
+7 -6

No files matched your search

+2 -1
View File
@@ -180,10 +180,11 @@ impl CardStatistics {
#[derive(Clone, Copy)]
pub struct EntityHandle<E> {
pub(crate) _phantom: PhantomData<E>,
pub(crate) id: Id,
pub(crate) real: bool,
pub(crate) index: u32,
pub(crate) _phantom: PhantomData<E>,
}
pub trait EntityData{
+2 -2
View File
@@ -241,8 +241,8 @@ for DataRepositoryInner<T, D>
h.real = true;
}
for handle in cached.iter_mut() {
let h = &mut **handle;
for handle in cached.into_iter() {
let h = handle;
let idx = fast_position_of(self.cache.as_slice(), h).unwrap();
self.data_layer
.write_entity(&self.cache[idx], &self.connection.lock())?;
+3 -3
View File
@@ -65,7 +65,7 @@ mod mod_tests {
};
assert_eq!(
fast_position_of(&[1, 2, 3, 8, 9, 12].map(ProtoEntity::new), &mut entity),
Some(1)
Some(4)
);
}
@@ -75,7 +75,7 @@ mod mod_tests {
_phantom: Default::default(),
id: 106.into(),
real: true,
index: 5,
index: 25,
};
assert_eq!(
fast_position_of(
@@ -86,7 +86,7 @@ mod mod_tests {
.map(ProtoEntity::new),
&mut entity
),
Some(1)
Some(18)
);
}
}