computer: convert stores to vecs part 2

This commit is contained in:
nym21
2025-07-16 16:23:40 +02:00
parent 1505454793
commit a0cfc1be2b
23 changed files with 749 additions and 340 deletions
+1 -1
View File
@@ -29,7 +29,7 @@ pub use params::{IdParam, Params, ParamsOpt};
pub use table::Tabled;
use vecs::Vecs;
use crate::{IdToVec, IndexToVec};
use crate::vecs::{IdToVec, IndexToVec};
pub struct Interface<'a> {
vecs: Vecs<'a>,
-27
View File
@@ -101,33 +101,6 @@ impl<'a> Vecs<'a> {
fn insert(&mut self, vec: &'a dyn AnyCollectableVec) {
let name = vec.name();
let serialized_index = vec.index_type_to_string();
// let split = name.split("_to_").collect::<Vec<_>>();
// if split.len() != 1
// && !(split.len() == 2
// && split.first().is_some_and(|s| {
// s == &"up"
// || s == &"start"
// || s.ends_with("relative")
// || s.starts_with("from")
// || s == &"cumulative_up"
// || s.starts_with("cumulative_start")
// || s.starts_with("cumulative_from")
// || s == &"activity"
// }))
// && !(split.len() == 3
// && split.first().is_some_and(|s| {
// s == &"up"
// || s == &"start"
// || s.starts_with("from")
// || s == &"cumulative_up"
// || s == &"cumulative_start"
// || s.starts_with("cumulative_from")
// })
// && split.get(1).is_some_and(|s| s.ends_with("relative")))
// {
// dbg!((&serialized_index, &name, &split));
// unreachable!();
// }
let index = Index::try_from(serialized_index)
.inspect_err(|_| {
dbg!(&serialized_index);