summaryrefslogtreecommitdiff
path: root/alacritty_terminal
diff options
context:
space:
mode:
authorKirill Chibisov <wchibisovkirill@gmail.com>2019-10-06 13:47:20 +0300
committerChristian Duerr <contact@christianduerr.com>2019-10-06 12:47:20 +0200
commit24651a6144e5071f0a72d991734a9b380255156e (patch)
tree92135f2f51abb709229dd94c29e0331cec01bf42 /alacritty_terminal
parent729eef0c933831bccfeac6a355bdb410787fbe5f (diff)
downloadalacritty-24651a6144e5071f0a72d991734a9b380255156e.tar.gz
alacritty-24651a6144e5071f0a72d991734a9b380255156e.zip
Remove automatic config generation
Fixes #2818.
Diffstat (limited to 'alacritty_terminal')
-rw-r--r--alacritty_terminal/src/config/mod.rs11
1 files changed, 1 insertions, 10 deletions
diff --git a/alacritty_terminal/src/config/mod.rs b/alacritty_terminal/src/config/mod.rs
index cd900373..f810b519 100644
--- a/alacritty_terminal/src/config/mod.rs
+++ b/alacritty_terminal/src/config/mod.rs
@@ -18,7 +18,6 @@ use std::fmt::Display;
use std::path::PathBuf;
use log::error;
-use serde::de::DeserializeOwned;
use serde::{Deserialize, Deserializer};
use serde_yaml::Value;
@@ -39,15 +38,13 @@ pub use crate::config::visual_bell::{VisualBellAnimation, VisualBellConfig};
pub use crate::config::window::{Decorations, Dimensions, StartupMode, WindowConfig, DEFAULT_NAME};
use crate::term::color::Rgb;
-pub static DEFAULT_ALACRITTY_CONFIG: &str =
- include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/../alacritty.yml"));
pub const LOG_TARGET_CONFIG: &str = "alacritty_config";
const MAX_SCROLLBACK_LINES: u32 = 100_000;
pub type MockConfig = Config<HashMap<String, serde_yaml::Value>>;
/// Top-level config type
-#[derive(Debug, PartialEq, Deserialize)]
+#[derive(Debug, PartialEq, Default, Deserialize)]
pub struct Config<T> {
/// Pixel padding
#[serde(default, deserialize_with = "failure_default")]
@@ -142,12 +139,6 @@ pub struct Config<T> {
pub persistent_logging: Option<bool>,
}
-impl<T: DeserializeOwned> Default for Config<T> {
- fn default() -> Self {
- serde_yaml::from_str(DEFAULT_ALACRITTY_CONFIG).expect("default config is invalid")
- }
-}
-
impl<T> Config<T> {
pub fn tabspaces(&self) -> usize {
self.tabspaces.0