From 9b2ec62be910c395edf08c0279bca6abfa50269f Mon Sep 17 00:00:00 2001 From: writegr <167099595+writegr@users.noreply.github.com> Date: Thu, 18 Apr 2024 14:39:38 +0800 Subject: [PATCH] chore: fix some typos in comments (#7752) Signed-off-by: writegr --- src/flutter.rs | 2 +- src/platform/linux_desktop_manager.rs | 2 +- src/platform/windows.rs | 2 +- src/server/input_service.rs | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/flutter.rs b/src/flutter.rs index f733bb70c..f86755952 100644 --- a/src/flutter.rs +++ b/src/flutter.rs @@ -1106,7 +1106,7 @@ pub fn session_start_( ) -> ResultType<()> { // is_connected is used to indicate whether to start a peer connection. For two cases: // 1. "Move tab to new window" - // 2. multi ui session within the same peer connnection. + // 2. multi ui session within the same peer connection. let mut is_connected = false; let mut is_found = false; for s in sessions::get_sessions() { diff --git a/src/platform/linux_desktop_manager.rs b/src/platform/linux_desktop_manager.rs index 8e8cce95c..21b123799 100644 --- a/src/platform/linux_desktop_manager.rs +++ b/src/platform/linux_desktop_manager.rs @@ -277,7 +277,7 @@ impl DesktopManager { } } - // The logic mainly fron https://github.com/neutrinolabs/xrdp/blob/34fe9b60ebaea59e8814bbc3ca5383cabaa1b869/sesman/session.c#L334. + // The logic mainly from https://github.com/neutrinolabs/xrdp/blob/34fe9b60ebaea59e8814bbc3ca5383cabaa1b869/sesman/session.c#L334. fn get_avail_display() -> ResultType { let display_range = 0..51; for i in display_range.clone() { diff --git a/src/platform/windows.rs b/src/platform/windows.rs index baa932c40..c28570219 100644 --- a/src/platform/windows.rs +++ b/src/platform/windows.rs @@ -1874,7 +1874,7 @@ pub fn current_resolution(name: &str) -> ResultType { dm.dmSize = std::mem::size_of::() as _; if EnumDisplaySettingsW(device_name.as_ptr(), ENUM_CURRENT_SETTINGS, &mut dm) == 0 { bail!( - "failed to get currrent resolution, error {}", + "failed to get current resolution, error {}", io::Error::last_os_error() ); } diff --git a/src/server/input_service.rs b/src/server/input_service.rs index 7d1392bbf..81ca155d7 100644 --- a/src/server/input_service.rs +++ b/src/server/input_service.rs @@ -187,7 +187,7 @@ impl LockModesHandler { fn new(key_event: &KeyEvent) -> Self { let event_caps_enabled = Self::is_modifier_enabled(key_event, ControlKey::CapsLock); // Do not use the following code to detect `local_caps_enabled`. - // Because the state of get_key_state will not affect simuation of `VIRTUAL_INPUT_STATE` in this file. + // Because the state of get_key_state will not affect simulation of `VIRTUAL_INPUT_STATE` in this file. // // let local_caps_enabled = VirtualInput::get_key_state( // CGEventSourceStateID::CombinedSessionState,