summaryrefslogtreecommitdiff
path: root/ext/ffi/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'ext/ffi/lib.rs')
-rw-r--r--ext/ffi/lib.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/ext/ffi/lib.rs b/ext/ffi/lib.rs
index d2b0d24df..4b83070d3 100644
--- a/ext/ffi/lib.rs
+++ b/ext/ffi/lib.rs
@@ -294,7 +294,6 @@ pub(crate) fn format_error(e: dlopen::Error, path: String) -> String {
use std::ffi::OsStr;
use std::os::windows::ffi::OsStrExt;
use winapi::shared::minwindef::DWORD;
- use winapi::shared::ntdef::WCHAR;
use winapi::shared::winerror::ERROR_INSUFFICIENT_BUFFER;
use winapi::um::errhandlingapi::GetLastError;
use winapi::um::winbase::FormatMessageW;
@@ -314,7 +313,7 @@ pub(crate) fn format_error(e: dlopen::Error, path: String) -> String {
let lang_id =
MAKELANGID(LANG_SYSTEM_DEFAULT, SUBLANG_SYS_DEFAULT) as DWORD;
- let mut buf = vec![0 as WCHAR; 500];
+ let mut buf = vec![0; 500];
let path = OsStr::new(&path)
.encode_wide()