From 990af5334321d1f77b6f87b090c7255783ff2a08 Mon Sep 17 00:00:00 2001 From: joaoviictorti Date: Fri, 27 Sep 2024 21:08:42 -0300 Subject: [PATCH] docs: add documentation for get_windows_build_number function - Added concise documentation for the `get_windows_build_number` function, explaining its purpose, return value, and safety considerations. --- driver/src/utils/mod.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/driver/src/utils/mod.rs b/driver/src/utils/mod.rs index 5935a7c..2cfb0eb 100644 --- a/driver/src/utils/mod.rs +++ b/driver/src/utils/mod.rs @@ -490,11 +490,12 @@ where result // Returns the result of the operation } +/// Retrieves the Windows build number by calling `RtlGetVersion`. +/// +/// # Return +/// +/// - `u32`: The Windows build number if successful, otherwise returns 0. /// -/// -/// -/// -/// pub fn get_windows_build_number() -> u32 { unsafe { let mut os_info: OSVERSIONINFOW = core::mem::zeroed();