1
Fork 0

Rollup merge of #135696 - joboet:move_pal_io, r=Noratrieb

std: move `io` module out of `pal`, get rid of `sys_common::io`

Part of #117276.

This does two related things:
1. It moves the platform-specific definitions for `IoSlice`, `IoSliceMut` and `is_terminal` out of `pal` and into `sys` and unifies some of them.
2. It gets rid of `sys_common::io`, moving the non-platform-specific test helpers into `std::test_helpers` and the buffer size definition to the new `sys::io` module.
This commit is contained in:
Matthias Krüger 2025-02-08 21:37:24 +01:00 committed by GitHub
commit 02b8bea084
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
40 changed files with 165 additions and 318 deletions

View file

@ -549,7 +549,7 @@ fn debug_print() {
#[test]
#[cfg(windows)]
fn run_bat_script() {
let tempdir = crate::sys_common::io::test::tmpdir();
let tempdir = crate::test_helpers::tmpdir();
let script_path = tempdir.join("hello.cmd");
crate::fs::write(&script_path, "@echo Hello, %~1!").unwrap();
@ -568,7 +568,7 @@ fn run_bat_script() {
#[test]
#[cfg(windows)]
fn run_canonical_bat_script() {
let tempdir = crate::sys_common::io::test::tmpdir();
let tempdir = crate::test_helpers::tmpdir();
let script_path = tempdir.join("hello.cmd");
crate::fs::write(&script_path, "@echo Hello, %~1!").unwrap();