INNER CODE UNIT · Rust
Some
atanunq/viu · src/app.rs:182
while let Some((delay, frame)) = iter.next() {
let (_print_width, print_height) = viuer::print(frame, &conf.viuer_config)?;
if conf.static_gif {
break 'infinite;
}
thread::sleep(match conf.frame_duration {
None => *delay,
Some(duration) => duration,
});
//if ctrlc is received then respond so the handler can clear the
// terminal from leftover colors
if rx.try_recv().is_ok() {
return tx
.send(true)
.map_err(|_| Error::other("Could not send signal to clean up.").into());