aboutsummaryrefslogtreecommitdiff
path: root/src/util
diff options
context:
space:
mode:
Diffstat (limited to 'src/util')
-rw-r--r--src/util/windows.rs4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/util/windows.rs b/src/util/windows.rs
index 4764201..7715773 100644
--- a/src/util/windows.rs
+++ b/src/util/windows.rs
@@ -168,9 +168,7 @@ pub fn list_services(sc_manager: Services::SC_HANDLE) -> windows::core::Result<V
)
};
- if let Err(ref e) = result
- && e.code() != Foundation::ERROR_MORE_DATA.to_hresult()
- {
+ if result.as_ref().is_err_and(|e| e.code() != Foundation::ERROR_MORE_DATA.to_hresult()) {
return result.map(|_| unreachable!());
}