From 8704e1573864565503413fea54b3545c5451b683 Mon Sep 17 00:00:00 2001 From: RustDesk <71636191+rustdesk@users.noreply.github.com> Date: Thu, 8 Dec 2022 23:05:51 +0800 Subject: [PATCH] fix last pr --- libs/hbb_common/src/platform/linux.rs | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/libs/hbb_common/src/platform/linux.rs b/libs/hbb_common/src/platform/linux.rs index e50823438..9e581d01d 100644 --- a/libs/hbb_common/src/platform/linux.rs +++ b/libs/hbb_common/src/platform/linux.rs @@ -65,20 +65,12 @@ fn get_display_server_of_session(session: &str) -> String { { if xorg_results.trim_end().to_string() != "" { // If it is, manually return "x11", otherwise return tty - "x11".to_owned() - } else { - display_server + return "x11".to_owned() } - } else { - // If any of these commands fail just fall back to the display server - display_server } - } else { - display_server } - } else { - "".to_owned() } + display_server } else { "".to_owned() };