std: fix module references on Windows

This commit is contained in:
joboet 2024-01-11 20:26:20 +01:00
parent 411f34b782
commit d6efeadb06
No known key found for this signature in database
GPG Key ID: 704E0149B0194B3C
4 changed files with 5 additions and 5 deletions

View File

@ -6,6 +6,7 @@
#[cfg(test)]
mod tests;
use super::os::current_exe;
use crate::ffi::OsString;
use crate::fmt;
use crate::io;
@ -14,7 +15,6 @@
use crate::path::{Path, PathBuf};
use crate::sys::path::get_long_path;
use crate::sys::process::ensure_no_nuls;
use crate::sys::windows::os::current_exe;
use crate::sys::{c, to_u16s};
use crate::sys_common::wstr::WStrUnits;
use crate::vec;
@ -318,8 +318,8 @@ pub(crate) fn to_user_path(path: &Path) -> io::Result<Vec<u16>> {
from_wide_to_user_path(to_u16s(path)?)
}
pub(crate) fn from_wide_to_user_path(mut path: Vec<u16>) -> io::Result<Vec<u16>> {
use super::fill_utf16_buf;
use crate::ptr;
use crate::sys::windows::fill_utf16_buf;
// UTF-16 encoded code points, used in parsing and building UTF-16 paths.
// All of these are in the ASCII range so they can be cast directly to `u16`.

View File

@ -1,5 +1,5 @@
use super::*;
use crate::ffi::OsString;
use crate::sys::windows::args::*;
fn chk(string: &str, parts: &[&str]) {
let mut wide: Vec<u16> = OsString::from(string).encode_wide().collect();

View File

@ -27,7 +27,7 @@ pub unsafe fn wait_timeout(&self, mutex: &Mutex, dur: Duration) -> bool {
let r = c::SleepConditionVariableSRW(
self.inner.get(),
mutex::raw(mutex),
crate::sys::windows::dur2timeout(dur),
crate::sys::pal::windows::dur2timeout(dur),
0,
);
if r == 0 {

View File

@ -1,5 +1,6 @@
#![unstable(issue = "none", feature = "windows_stdio")]
use super::api;
use crate::cmp;
use crate::io;
use crate::mem::MaybeUninit;
@ -9,7 +10,6 @@
use crate::sys::c;
use crate::sys::cvt;
use crate::sys::handle::Handle;
use crate::sys::windows::api;
use core::str::utf8_char_width;
#[cfg(test)]