refact: suppress warns on macos (#12449)
Signed-off-by: fufesou <linlong1266@gmail.com>
This commit is contained in:
+4
-1
@@ -119,16 +119,18 @@ pub fn get_wakelock(_display: bool) -> WakeLock {
|
||||
return crate::platform::WakeLock::new(_display, true, false);
|
||||
}
|
||||
|
||||
#[cfg(any(target_os = "windows", target_os = "linux"))]
|
||||
pub(crate) struct InstallingService; // please use new
|
||||
|
||||
#[cfg(any(target_os = "windows", target_os = "linux"))]
|
||||
impl InstallingService {
|
||||
#[cfg(any(target_os = "windows", target_os = "linux"))]
|
||||
pub fn new() -> Self {
|
||||
*INSTALLING_SERVICE.lock().unwrap() = true;
|
||||
Self
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(any(target_os = "windows", target_os = "linux"))]
|
||||
impl Drop for InstallingService {
|
||||
fn drop(&mut self) {
|
||||
*INSTALLING_SERVICE.lock().unwrap() = false;
|
||||
@@ -144,6 +146,7 @@ pub fn is_prelogin() -> bool {
|
||||
// Note: This method is inefficient on Windows. It will get all the processes.
|
||||
// It should only be called when performance is not critical.
|
||||
// If we wanted to get the command line ourselves, there would be a lot of new code.
|
||||
#[allow(dead_code)]
|
||||
#[cfg(not(any(target_os = "android", target_os = "ios")))]
|
||||
fn get_pids_of_process_with_args<S1: AsRef<str>, S2: AsRef<str>>(
|
||||
name: S1,
|
||||
|
||||
Reference in New Issue
Block a user