mirror of
https://github.com/helix-editor/helix.git
synced 2024-11-26 03:13:29 +04:00
examples: continue handling output events
This commit is contained in:
parent
279db98d3c
commit
6c0f7eafc3
@ -11,6 +11,7 @@ struct LaunchArguments {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async fn output(mut output_event: Receiver<Event>) {
|
async fn output(mut output_event: Receiver<Event>) {
|
||||||
|
loop {
|
||||||
let body: OutputEventBody =
|
let body: OutputEventBody =
|
||||||
from_value(output_event.recv().await.unwrap().body.unwrap()).unwrap();
|
from_value(output_event.recv().await.unwrap().body.unwrap()).unwrap();
|
||||||
println!(
|
println!(
|
||||||
@ -19,6 +20,7 @@ async fn output(mut output_event: Receiver<Event>) {
|
|||||||
body.output
|
body.output
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#[tokio::main]
|
#[tokio::main]
|
||||||
pub async fn main() -> Result<()> {
|
pub async fn main() -> Result<()> {
|
||||||
|
@ -11,6 +11,7 @@ struct LaunchArguments {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async fn output(mut output_event: Receiver<Event>) {
|
async fn output(mut output_event: Receiver<Event>) {
|
||||||
|
loop {
|
||||||
let body: OutputEventBody =
|
let body: OutputEventBody =
|
||||||
from_value(output_event.recv().await.unwrap().body.unwrap()).unwrap();
|
from_value(output_event.recv().await.unwrap().body.unwrap()).unwrap();
|
||||||
println!(
|
println!(
|
||||||
@ -19,6 +20,7 @@ async fn output(mut output_event: Receiver<Event>) {
|
|||||||
body.output
|
body.output
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#[tokio::main]
|
#[tokio::main]
|
||||||
pub async fn main() -> Result<()> {
|
pub async fn main() -> Result<()> {
|
||||||
|
Loading…
Reference in New Issue
Block a user