From 2e79762f80e55c9f0897fafc0f5499060343217f Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Sat, 20 Oct 2018 16:46:46 +0200 Subject: read_config_file(): Update to get the config from `config.toml` Use XDG handling from `state_load_map_group()` to do basically the same thing here for reading the config from a `config.toml` file. Use 'error-chain' to handle the `Result`s more easily. No more nested pattern matching, we'll just have to unwrap one `Result` and write the error to stderr in an FFI function. --- src/lib.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/lib.rs') diff --git a/src/lib.rs b/src/lib.rs index d5af695..801591c 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -6,6 +6,9 @@ extern crate cocoa; #[macro_use] extern crate combine; extern crate core_graphics; + +#[macro_use] +extern crate error_chain; extern crate foreign_types; extern crate getopts; extern crate libc; @@ -25,6 +28,7 @@ extern crate xdg; mod autopilot_internal; mod cocoa_bridge; mod config; +mod errors; mod key_code; mod parser; -- cgit v1.2.3