Refactored component
This commit is contained in:
@@ -2,11 +2,8 @@ use std::{io::stdout, sync::Arc, time::Instant};
|
||||
|
||||
use crossterm::{cursor::MoveTo, execute, terminal::Clear};
|
||||
|
||||
use crate::{
|
||||
prelude::{ComponentImpl, Context},
|
||||
render::Area,
|
||||
DrawContext, View,
|
||||
};
|
||||
use crate::component::{context::Context, ComponentImpl};
|
||||
use crate::{render::Area, DrawContext, View};
|
||||
|
||||
use super::Engine;
|
||||
|
||||
|
||||
@@ -5,9 +5,9 @@ use std::{
|
||||
|
||||
use crossterm::{cursor::MoveTo, execute, terminal::Clear};
|
||||
|
||||
use crate::component::{context::Context, ComponentImpl};
|
||||
use crate::{
|
||||
engine::{commands, CommandExecutor},
|
||||
prelude::{ComponentImpl, Context},
|
||||
render::Area,
|
||||
DrawContext, View,
|
||||
};
|
||||
|
||||
+2
-5
@@ -7,11 +7,8 @@ pub use console::*;
|
||||
|
||||
use std::{any::Any, sync::Arc};
|
||||
|
||||
use crate::{
|
||||
prelude::{ComponentImpl, Context},
|
||||
render::Area,
|
||||
DrawContext, View,
|
||||
};
|
||||
use crate::component::{context::Context, ComponentImpl};
|
||||
use crate::{render::Area, DrawContext, View};
|
||||
|
||||
pub trait Engine<Output = ()> {
|
||||
fn run<C: ComponentImpl + 'static>(&self, component: C) -> crate::Result<Output>;
|
||||
|
||||
Reference in New Issue
Block a user