mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-06-11 21:22:51 +02:00
refactor(windows-rs): use "wide" fns uniformly
This commit builds on @EBNull's comment shedding light on the uses of the -A and -W functions in the Win32 API, and standardizes the calling of the -W functions across the project. Since UTF-16 String handling is a bit lacking in the Rust standard library, I have pulled in the widestring crate to use the from_slice_truncate fn to automagically remove all of the trailing null chars when handling values returned from the various Win32 -W fns. Comment ref: https://github.com/LGUG2Z/komorebi/commit/657ac441ae3bc6c748908a6e88b9e1a37d411420#r135643553
This commit is contained in:
Generated
+7
@@ -827,6 +827,7 @@ dependencies = [
|
||||
"tracing-subscriber",
|
||||
"uds_windows",
|
||||
"which",
|
||||
"widestring",
|
||||
"windows",
|
||||
"windows-implement",
|
||||
"windows-interface",
|
||||
@@ -2331,6 +2332,12 @@ dependencies = [
|
||||
"windows-sys 0.48.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "widestring"
|
||||
version = "1.0.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "653f141f39ec16bba3c5abe400a0c60da7468261cc2cbf36805022876bc721a8"
|
||||
|
||||
[[package]]
|
||||
name = "winapi"
|
||||
version = "0.2.8"
|
||||
|
||||
Reference in New Issue
Block a user