From 68870e724330bc95686d4957ad8ed2d043f30f4d Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Sat, 27 Oct 2018 23:36:54 +0200 Subject: dome_key_logger_init(): Log `Err` instead of `unwrap()` Instead of just unwrapping, print the error message in our error format. --- src/ffi.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/ffi.rs b/src/ffi.rs index 91a48c3..3772b65 100644 --- a/src/ffi.rs +++ b/src/ffi.rs @@ -39,7 +39,7 @@ pub extern "C" fn dome_key_logger_init() { .color(stderrlog::ColorChoice::Never) .timestamp(stderrlog::Timestamp::Millisecond) .init() - .unwrap(); + .unwrap_or_else(|e| dkeprintln!("{}", e)); } #[no_mangle] -- cgit v1.2.3