mirror of
https://github.com/alexpasmantier/television.git
synced 2025-06-07 03:55:23 +00:00
fix(config): add serde default for shell integration configuration
This commit is contained in:
parent
4b632f81f8
commit
6a4f767ea8
@ -99,9 +99,9 @@ impl Config {
|
||||
let path = config_dir.join(CONFIG_FILE_NAME);
|
||||
let contents = std::fs::read_to_string(&path)?;
|
||||
|
||||
let cfg: Config = toml::from_str(&contents).unwrap_or_else(|_| {
|
||||
let cfg: Config = toml::from_str(&contents).unwrap_or_else(|e| {
|
||||
warn!(
|
||||
"Error parsing config file, using default configuration"
|
||||
"Error parsing config file, using default configuration: {}" , e
|
||||
);
|
||||
default_config.clone()
|
||||
});
|
||||
|
@ -4,6 +4,7 @@ use rustc_hash::FxHashMap;
|
||||
use serde::Deserialize;
|
||||
|
||||
#[derive(Clone, Debug, Deserialize, Default)]
|
||||
#[serde(default)]
|
||||
pub struct ShellIntegrationConfig {
|
||||
pub commands: FxHashMap<String, String>,
|
||||
pub keybindings: FxHashMap<String, String>,
|
||||
|
Loading…
x
Reference in New Issue
Block a user