File tree Expand file tree Collapse file tree 3 files changed +9
-6
lines changed
Expand file tree Collapse file tree 3 files changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,6 @@ edition = "2021"
55publish = false
66
77[dependencies ]
8- anyhow = { workspace = true }
98promkit = { path = " ../../promkit" }
109tokio = { workspace = true }
1110
Original file line number Diff line number Diff line change 1515/// Enter to execute tasks. Use Ctrl+C to exit the prompt.
1616use std:: { collections:: HashSet , sync:: Arc , time:: Duration } ;
1717
18- use anyhow:: Result ;
1918use promkit:: {
20- async_trait,
19+ anyhow , async_trait,
2120 core:: {
2221 crossterm:: { self , style:: Color } ,
2322 grapheme:: StyledGraphemes ,
@@ -54,15 +53,19 @@ enum Index {
5453/// Task events for monitor
5554#[ derive( Debug ) ]
5655enum TaskEvent {
57- TaskStarted { handle : JoinHandle < Result < String > > } ,
58- TaskCompleted { result : Result < String > } ,
56+ TaskStarted {
57+ handle : JoinHandle < anyhow:: Result < String > > ,
58+ } ,
59+ TaskCompleted {
60+ result : anyhow:: Result < String > ,
61+ } ,
5962}
6063
6164/// Task monitor daemon for managing background tasks
6265struct TaskMonitor {
6366 event_sender : mpsc:: UnboundedSender < TaskEvent > ,
6467 monitor_handle : JoinHandle < ( ) > ,
65- task_handle : Arc < RwLock < Option < JoinHandle < Result < String > > > > > ,
68+ task_handle : Arc < RwLock < Option < JoinHandle < anyhow :: Result < String > > > > > ,
6669}
6770
6871impl spinner:: State for TaskMonitor {
Original file line number Diff line number Diff line change 11#![ doc = include_str ! ( "../README.md" ) ]
22#![ cfg_attr( docsrs, feature( doc_cfg) ) ]
33
4+ pub use anyhow;
45pub use async_trait;
56pub use promkit_widgets as widgets;
67pub use promkit_widgets:: core;
You can’t perform that action at this time.
0 commit comments