1
0
mirror of https://github.com/asciinema/agg.git synced 2025-04-19 05:02:14 +03:00

Move default idle time limit value to a const

This commit is contained in:
Marcin Kulik 2023-06-11 15:29:24 +02:00
parent a078860d47
commit 39223d516e
2 changed files with 2 additions and 1 deletions

BIN
demo.gif

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 MiB

After

Width:  |  Height:  |  Size: 15 MiB

View File

@ -19,6 +19,7 @@ pub const DEFAULT_LAST_FRAME_DURATION: f64 = 3.0;
pub const DEFAULT_LINE_HEIGHT: f64 = 1.4;
pub const DEFAULT_NO_LOOP: bool = false;
pub const DEFAULT_SPEED: f64 = 1.0;
pub const DEFAULT_IDLE_TIME_LIMIT: f64 = 5.0;
pub struct Config {
pub cols: Option<usize>,
@ -121,7 +122,7 @@ pub fn run<I: BufRead, O: Write + Send>(input: I, output: O, config: Config) ->
let itl = config
.idle_time_limit
.or(header.idle_time_limit)
.unwrap_or(5.0);
.unwrap_or(DEFAULT_IDLE_TIME_LIMIT);
let stdout = asciicast::stdout(events);
let stdout = iter::once((0.0, "".to_owned())).chain(stdout);