From 168deabea7825f1b2bf81ec79de9f4bfaab8413e Mon Sep 17 00:00:00 2001 From: Yutaka Kamei Date: Fri, 30 Apr 2021 23:35:12 +0900 Subject: Load config before start() Previously, a config file was loaded within `start()`, and if the config file is invalid, Zellij was supposed to show a user what's wrong with it. However, since `start()` starts setting up its terminal with an alternative screen buffer, neither standard output nor standard error could display such an error. This change intends to address this issue by making Zellij load a config file before `start()`. In addition, the patch also includes some refactorings: * Redefine `from_cli_config` with `TryFrom`, which was introduced in Rust 1.34 * Remove conditional declaration `cfg(not(test))` because `start()` now receive a `Config` as the third argument * Introduce [`tempfile`](https://crates.io/crates/tempfile) in order to run tests with actual files * Typo?: "Deserialisation" -> "Deserialization" --- Cargo.lock | 1 + 1 file changed, 1 insertion(+) (limited to 'Cargo.lock') diff --git a/Cargo.lock b/Cargo.lock index c94f39ae7..55cfcf013 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2205,6 +2205,7 @@ dependencies = [ "strip-ansi-escapes", "structopt", "strum", + "tempfile", "termion", "termios", "unicode-truncate", -- cgit v1.2.3