Skip to content

Commit

Permalink
...
Browse files Browse the repository at this point in the history
  • Loading branch information
sebffischer committed Oct 16, 2024
1 parent 06c139e commit fd12d9e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
6 changes: 4 additions & 2 deletions src/callable/primitive/c.rs
Original file line number Diff line number Diff line change
Expand Up @@ -213,9 +213,11 @@ impl Callable for PrimitiveC {
};

if let Some(names) = names {
v.set_names(names.into());
println!("setting names");
Ok(Obj::Vector(v.set_names(names.into())))
} else {
Ok(Obj::Vector(v))
}
Ok(Obj::Vector(v))
}
}

Expand Down
11 changes: 10 additions & 1 deletion src/object/vector/reptype.rs
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,10 @@ impl<T: Clone + Default> RepType<T> {
pub fn values_ref(&self) -> IntoIterableRefValues<T> {
match self.clone() {
RepType::Subset(values, ..) => {
let iter = Box::new(self.iter_subset_indices());
for x in iter {
dbg!(&x);
}
let iter = Box::new(self.iter_subset_indices());
let values = values.inner_rc();

Expand Down Expand Up @@ -603,7 +607,12 @@ impl<T: Clone + Default> RepType<T> {
match self {
RepType::Subset(v, Subsets(s), _) => match s.as_slice() {
[] => v.borrow().len(),
_ => self.values_ref().iter().count(), // _ => self.materialize_inplace().len(),
_ => {
dbg!(&s[0]);
self.values_ref().iter().count(); // _ => self.materialize_inplace().len(),
println!("Wupsie");
todo!()
}
},
}
}
Expand Down

0 comments on commit fd12d9e

Please sign in to comment.