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:
parent
a078860d47
commit
39223d516e
BIN
demo.gif
BIN
demo.gif
Binary file not shown.
Before Width: | Height: | Size: 2.6 MiB After Width: | Height: | Size: 15 MiB |
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user