We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4eb206f commit ebce33cCopy full SHA for ebce33c
src/lib.rs
@@ -94,10 +94,13 @@ impl Termfest {
94
/// If succeeded, it returns a tuple of `Termfest` object and `Receiver<Event>`.
95
/// When the returned `Termfest` object is dropped, the terminal state will be restored.
96
///
97
- /// ```
+ /// ```no_run
98
+ /// # fn main() -> Result<(), std::io::Error> {
99
/// use termfest::Termfest;
- /// let (fest, events) = Termfest::hold().unwrap();
100
+ /// let (fest, events) = Termfest::hold()?;
101
/// // do something widht fest and events.
102
+ /// # Ok(())
103
+ /// # }
104
/// ```
105
pub fn hold() -> Result<(Termfest, mpsc::Receiver<Event>), io::Error> {
106
let mut ttyout = OpenOptions::new()
0 commit comments