Skip to content

Commit

Permalink
Merge pull request #65 from cakebaker/fix_clippy_warnings
Browse files Browse the repository at this point in the history
Use "from" instead of "try_from"
  • Loading branch information
sylvestre authored Jan 18, 2024
2 parents 03b8d10 + b5bf2b4 commit 5a2fd8e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/platform/windows.rs
Original file line number Diff line number Diff line change
Expand Up @@ -420,10 +420,10 @@ fn mmbr_from_file_version(
) -> Result<MmbrVersion, WinOSError> {
let info = WinOsFileVersionInfoQuery_root(&file_version_info)?;
Ok(MmbrVersion {
major: DWORD::try_from(HIWORD(info.dwProductVersionMS))?,
minor: DWORD::try_from(LOWORD(info.dwProductVersionMS))?,
build: DWORD::try_from(HIWORD(info.dwProductVersionLS))?,
release: DWORD::try_from(LOWORD(info.dwProductVersionLS))?,
major: DWORD::from(HIWORD(info.dwProductVersionMS)),
minor: DWORD::from(LOWORD(info.dwProductVersionMS)),
build: DWORD::from(HIWORD(info.dwProductVersionLS)),
release: DWORD::from(LOWORD(info.dwProductVersionLS)),
})
}

Expand Down

0 comments on commit 5a2fd8e

Please sign in to comment.