Skip to content

Commit c58a1c0

Browse files
committed
chore: export anyhow crate from promkit
1 parent 0765cbf commit c58a1c0

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

examples/byop/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ edition = "2021"
55
publish = false
66

77
[dependencies]
8-
anyhow = { workspace = true }
98
promkit = { path = "../../promkit" }
109
tokio = { workspace = true }
1110

examples/byop/src/byop.rs

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,8 @@
1515
/// Enter to execute tasks. Use Ctrl+C to exit the prompt.
1616
use std::{collections::HashSet, sync::Arc, time::Duration};
1717

18-
use anyhow::Result;
1918
use 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)]
5655
enum 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
6265
struct 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

6871
impl spinner::State for TaskMonitor {

promkit/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#![doc = include_str!("../README.md")]
22
#![cfg_attr(docsrs, feature(doc_cfg))]
33

4+
pub use anyhow;
45
pub use async_trait;
56
pub use promkit_widgets as widgets;
67
pub use promkit_widgets::core;

0 commit comments

Comments
 (0)