Skip to content

Commit ebce33c

Browse files
committed
In CI, tty is not available
1 parent 4eb206f commit ebce33c

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/lib.rs

+5-2
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,13 @@ impl Termfest {
9494
/// If succeeded, it returns a tuple of `Termfest` object and `Receiver<Event>`.
9595
/// When the returned `Termfest` object is dropped, the terminal state will be restored.
9696
///
97-
/// ```
97+
/// ```no_run
98+
/// # fn main() -> Result<(), std::io::Error> {
9899
/// use termfest::Termfest;
99-
/// let (fest, events) = Termfest::hold().unwrap();
100+
/// let (fest, events) = Termfest::hold()?;
100101
/// // do something widht fest and events.
102+
/// # Ok(())
103+
/// # }
101104
/// ```
102105
pub fn hold() -> Result<(Termfest, mpsc::Receiver<Event>), io::Error> {
103106
let mut ttyout = OpenOptions::new()

0 commit comments

Comments
 (0)