Skip to content

Commit a1c1830

Browse files
committed
Simplify stream calls in display
1 parent fdbc515 commit a1c1830

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/cmd/display.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use anyhow::Result;
33
use clap::{command, Parser};
44
use crossterm::event::{Event, EventStream};
55
use futures::{select, StreamExt};
6-
use lighthouse_client::protocol::{Frame, Model, Value, Verb};
6+
use lighthouse_client::protocol::{Frame, Model};
77
use ratatui::{
88
backend::CrosstermBackend,
99
crossterm::{
@@ -34,7 +34,7 @@ pub async fn invoke(args: &[String], ctx: &mut Context) -> Result<String> {
3434
let args = Args::try_parse_from(args)?;
3535
let path = ctx.cwd.join(args.path);
3636

37-
let mut stream = ctx.lh.stream::<Value, Model>(&path.as_lh_vec(), Value::Nil).await?.fuse();
37+
let mut stream = ctx.lh.stream(&path.as_lh_vec(), ()).await?.fuse();
3838

3939
enable_raw_mode()?;
4040
stdout().execute(EnterAlternateScreen)?;
@@ -67,7 +67,7 @@ pub async fn invoke(args: &[String], ctx: &mut Context) -> Result<String> {
6767
stdout().execute(LeaveAlternateScreen)?;
6868
disable_raw_mode()?;
6969

70-
ctx.lh.perform::<Value, Value>(&Verb::Stop, &path.as_lh_vec(), Value::Nil).await?;
70+
ctx.lh.stop(&path.as_lh_vec()).await?;
7171

7272
Ok(String::new())
7373
}

0 commit comments

Comments
 (0)