diff options
author | rustdesk <[email protected]> | 2023-02-08 17:07:27 +0800 |
---|---|---|
committer | rustdesk <[email protected]> | 2023-02-08 17:07:27 +0800 |
commit | 6ec46cb95faf4cf6d9e142290d36c3935e7cfd8a (patch) | |
tree | 9edd0aa9217f04730bac4242dc7e0dd35f3f3c3a /libs | |
parent | e2f4962ba81a8b8dadf1e64a819bdc6d60892ca6 (diff) | |
download | rustdesk-server-6ec46cb95faf4cf6d9e142290d36c3935e7cfd8a.tar.gz rustdesk-server-6ec46cb95faf4cf6d9e142290d36c3935e7cfd8a.zip |
CI
Diffstat (limited to 'libs')
-rw-r--r-- | libs/hbb_common/src/config.rs | 2 | ||||
-rw-r--r-- | libs/hbb_common/src/lib.rs | 5 | ||||
-rw-r--r-- | libs/hbb_common/src/platform/linux.rs | 2 |
3 files changed, 3 insertions, 6 deletions
diff --git a/libs/hbb_common/src/config.rs b/libs/hbb_common/src/config.rs index 63498a1..1e4d80c 100644 --- a/libs/hbb_common/src/config.rs +++ b/libs/hbb_common/src/config.rs @@ -288,7 +288,7 @@ fn patch(path: PathBuf) -> PathBuf { .trim() .to_owned(); if user != "root" { - return format!("/home/{}", user).into(); + return format!("/home/{user}").into(); } } } diff --git a/libs/hbb_common/src/lib.rs b/libs/hbb_common/src/lib.rs index 5cd3187..1c49adf 100644 --- a/libs/hbb_common/src/lib.rs +++ b/libs/hbb_common/src/lib.rs @@ -211,10 +211,7 @@ pub fn gen_version() { // generate build date let build_date = format!("{}", chrono::Local::now().format("%Y-%m-%d %H:%M")); file.write_all( - format!( - "#[allow(dead_code)]\npub const BUILD_DATE: &str = \"{build_date}\"\n;" - ) - .as_bytes(), + format!("#[allow(dead_code)]\npub const BUILD_DATE: &str = \"{build_date}\";\n").as_bytes(), ) .ok(); file.sync_all().ok(); diff --git a/libs/hbb_common/src/platform/linux.rs b/libs/hbb_common/src/platform/linux.rs index 716025d..7c107d1 100644 --- a/libs/hbb_common/src/platform/linux.rs +++ b/libs/hbb_common/src/platform/linux.rs @@ -60,7 +60,7 @@ fn get_display_server_of_session(session: &str) -> String { .replace("TTY=", "") .trim_end() .into(); - if let Ok(xorg_results) = run_cmds(format!("ps -e | grep \"{}.\\\\+Xorg\"", tty)) + if let Ok(xorg_results) = run_cmds(format!("ps -e | grep \"{tty}.\\\\+Xorg\"")) // And check if Xorg is running on that tty { if xorg_results.trim_end() != "" { |