added C for threading

This commit is contained in:
2024-11-16 16:38:06 +01:00
parent e1da609eb1
commit 74767cf961
13 changed files with 219 additions and 228 deletions
+3 -3
View File
@@ -78,7 +78,7 @@ pub fn render_to_frame(
state: crate::State,
width: usize,
frame: &mut Vec<String>,
element: &std::sync::Arc<dyn Element>,
element: &mut Box<dyn Element>,
) {
let data = element.get_data();
for (i, line) in element.render(state).split('\n').enumerate() {
@@ -130,7 +130,7 @@ pub enum Direction {
}
pub fn closest_component(
components: &[std::sync::Arc<dyn Element>],
components: &[&mut dyn Element],
current_index: usize,
direction: Direction,
) -> usize {
@@ -138,7 +138,7 @@ pub fn closest_component(
components
.iter()
.enumerate() // Keep track of indices
.enumerate()
.filter(|(i, comp_)| {
let comp = comp_.get_data();
match direction {