We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d80e361 commit 75010f3Copy full SHA for 75010f3
src/utils/utils.rs
@@ -611,7 +611,6 @@ pub fn format_path_for_display(path: &str) -> String {
611
/// Encodes a utf-8 string as a null-terminated UCS-2 string in bytes
612
#[cfg(windows)]
613
pub fn string_to_winreg_bytes(s: &str) -> Vec<u8> {
614
- use std::ffi::OsString;
615
use std::os::windows::ffi::OsStrExt;
616
let v: Vec<_> = OsString::from(format!("{}\x00", s)).encode_wide().collect();
617
unsafe { std::slice::from_raw_parts(v.as_ptr() as *const u8, v.len() * 2).to_vec() }
0 commit comments