diff --git a/src/errors.rs b/src/errors.rs index f830774..6644dab 100644 --- a/src/errors.rs +++ b/src/errors.rs @@ -1,13 +1,11 @@ -use std::sync::mpsc::RecvTimeoutError; - #[derive(Debug, thiserror::Error)] pub enum Errors { #[error("Could not detect font size")] NoFontSize, #[error("Could not detect any graphics nor font capabilities")] NoCap, - #[error("Timeout: {0}")] - Timeout(#[from] RecvTimeoutError), + #[error("No response from stdin")] + NoStdinResponse, #[error("Sixel error: {0}")] Sixel(String), #[error("Tmux error: {0}")] diff --git a/src/picker.rs b/src/picker.rs index cebdb26..63ba205 100644 --- a/src/picker.rs +++ b/src/picker.rs @@ -440,7 +440,7 @@ fn query_with_timeout( match rx.recv_timeout(timeout) { Ok(result) => Ok(result?), - Err(err) => Err(err.into()), + Err(_recvtimeout) => Err(Errors::NoStdinResponse), } }