Skip to content

Commit e2203b6

Browse files
committed
slightly more clean up
1 parent 41d7e6f commit e2203b6

File tree

1 file changed

+2
-11
lines changed

1 file changed

+2
-11
lines changed

helix-term/src/commands/engine/steel/components.rs

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -658,9 +658,6 @@ fn buffer_set_string(
658658

659659
/// A dynamic component, used for rendering
660660
pub struct SteelDynamicComponent {
661-
// TODO: currently the component id requires using a &'static str,
662-
// however in a world with dynamic components that might not be
663-
// the case anymore
664661
name: String,
665662
// This _should_ be a struct, but in theory can be whatever you want. It will be the first argument
666663
// passed to the functions in the remainder of the struct.
@@ -696,8 +693,6 @@ impl SteelDynamicComponent {
696693
roots.push(value.clone().as_rooted());
697694
}
698695

699-
// Keep root tokens around? Otherwise we're not going to be
700-
// able to reach these values from the runtime.
701696
Self {
702697
name,
703698
state,
@@ -720,7 +715,6 @@ impl SteelDynamicComponent {
720715
) -> WrappedDynComponent {
721716
let s = Self::new(name, state, render, h);
722717

723-
// TODO: Add guards here for the
724718
WrappedDynComponent {
725719
inner: Some(Box::new(s)),
726720
}
@@ -764,8 +758,8 @@ impl Component for SteelDynamicComponent {
764758

765759
let mut ctx = with_context_guard(ctx);
766760

767-
// Pass the `state` object through - this can be used for storing the state of whatever plugin thing we're
768-
// attempting to render
761+
// Pass the `state` object through - this can be used for storing the state of whatever
762+
// plugin thing we're attempting to render
769763
let thunk = |engine: &mut Engine, f| {
770764
engine.call_function_with_args_from_mut_slice(
771765
self.render.clone(),
@@ -801,9 +795,6 @@ impl Component for SteelDynamicComponent {
801795
});
802796
}
803797

804-
// TODO: Pass in event as well? Need to have immutable reference type
805-
// Otherwise, we're gonna be in a bad spot. For now - just clone the object and pass it through.
806-
// Clong is _not_ ideal, but it might be all we can do for now.
807798
fn handle_event(
808799
&mut self,
809800
event: &Event,

0 commit comments

Comments
 (0)