From 7f2b398ad2084bdaaa266e8da770a213f0a9a2eb Mon Sep 17 00:00:00 2001 From: Christian Duerr Date: Sun, 4 Mar 2018 22:40:15 +0000 Subject: Remove all instances of unwrap() from config Unwrapping inside the config file parsing can lead to some issues that prevent us from falling back to a default configuration file. One instance of that issue was mentioned in #1135. Now all instances of `unwrap()` have been removed and replaced with proper error handling. This will make the config more robust and prevents live reload from silently breaking while alacritty is running. This also fixes a few currently existing clippy issues. Clippy added an additonal lint which complains about `MyStruct { field: field }`. These issues have been fixed, except for some false-positives and issues in external macros which will probably be fixed with future updates (rust-lang-nursery/bitflags#149) --- src/event.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/event.rs') diff --git a/src/event.rs b/src/event.rs index b133f8fa..8c4107ca 100644 --- a/src/event.rs +++ b/src/event.rs @@ -227,12 +227,12 @@ impl Processor { mouse_config: config.mouse().to_owned(), print_events: options.print_events, wait_for_event: true, - notifier: notifier, - resize_tx: resize_tx, - ref_test: ref_test, + notifier, + resize_tx, + ref_test, mouse: Default::default(), selection: None, - size_info: size_info, + size_info, hide_cursor_when_typing: config.hide_cursor_when_typing(), hide_cursor: false, received_count: 0, -- cgit