INNER CODE UNIT · Rust
new
sachaos/viddy · src/app.rs:59
pub fn new(cli: Cli, mut store: S, read_only: bool) -> Result<Self> {
let runtime_config = if read_only {
let store_runtime_config = store.get_runtime_config()?.unwrap_or_default();
RuntimeConfig {
interval: Duration::milliseconds(store_runtime_config.interval as i64),
command: store_runtime_config
.command
.split(' ')
.map(|s| s.to_string())
.collect(),
}
} else {
let runtime_config = RuntimeConfig {
interval: cli.interval,
command: cli.command.clone(),
};