ci: remove Rust 1.94.0 workarounds (#7987)

This commit is contained in:
xtqqczze
2026-03-30 10:44:47 +02:00
committed by GitHub
parent ee4de81806
commit 6c72168a93
5 changed files with 23 additions and 28 deletions
+3 -3
View File
@@ -16,7 +16,7 @@ env:
task:
name: FreeBSD 64-bit
setup_script:
- pkg install -y bash ca_root_nss
- pkg install -y bash
- curl https://sh.rustup.rs -sSf --output rustup.sh
- sh rustup.sh -y --profile minimal --default-toolchain $RUST_STABLE
- . $HOME/.cargo/env
@@ -42,7 +42,7 @@ task:
RUSTFLAGS: --cfg docsrs --cfg tokio_unstable
RUSTDOCFLAGS: --cfg docsrs --cfg tokio_unstable -Dwarnings
setup_script:
- pkg install -y bash ca_root_nss
- pkg install -y bash
- curl https://sh.rustup.rs -sSf --output rustup.sh
- sh rustup.sh -y --profile minimal --default-toolchain $RUST_NIGHTLY
- . $HOME/.cargo/env
@@ -58,7 +58,7 @@ task:
task:
name: FreeBSD 32-bit
setup_script:
- pkg install -y bash ca_root_nss
- pkg install -y bash
- curl https://sh.rustup.rs -sSf --output rustup.sh
- sh rustup.sh -y --profile minimal --default-toolchain $RUST_STABLE
- . $HOME/.cargo/env
-2
View File
@@ -1060,8 +1060,6 @@ jobs:
target:
- wasm32-wasip1
- wasm32-wasip1-threads
env:
rust_stable: '1.93.1'
steps:
- uses: actions/checkout@v4
- name: Install Rust ${{ env.rust_stable }}
+2 -2
View File
@@ -16,9 +16,9 @@ use mock_open_options::MockOpenOptions as StdOpenOptions;
#[cfg(not(test))]
use std::fs::OpenOptions as StdOpenOptions;
#[cfg(all(unix, not(test)))]
#[cfg(unix)]
use std::os::unix::fs::OpenOptionsExt;
#[cfg(all(windows, not(test)))]
#[cfg(windows)]
use std::os::windows::fs::OpenOptionsExt;
/// Options and flags which can be used to configure how a file is opened.
+17 -17
View File
@@ -3,6 +3,10 @@
use mockall::mock;
use crate::fs::mocks::MockFile;
#[cfg(unix)]
use std::os::unix::fs::OpenOptionsExt;
#[cfg(windows)]
use std::os::windows::fs::OpenOptionsExt;
use std::{io, path::Path};
mock! {
@@ -15,25 +19,21 @@ mock! {
pub fn read(&mut self, read: bool) -> &mut Self;
pub fn truncate(&mut self, truncate: bool) -> &mut Self;
pub fn write(&mut self, write: bool) -> &mut Self;
// Not mocking OpenOptionsExt trait due to:
// https://github.com/rust-lang/rust/issues/153486
#[cfg(unix)]
pub fn custom_flags(&mut self, flags: i32) -> &mut Self;
#[cfg(unix)]
pub fn mode(&mut self, mode: u32) -> &mut Self;
#[cfg(windows)]
pub fn access_mode(&mut self, access: u32) -> &mut Self;
#[cfg(windows)]
pub fn share_mode(&mut self, val: u32) -> &mut Self;
#[cfg(windows)]
pub fn custom_flags(&mut self, flags: u32) -> &mut Self;
#[cfg(windows)]
pub fn attributes(&mut self, val: u32) -> &mut Self;
#[cfg(windows)]
pub fn security_qos_flags(&mut self, flags: u32) -> &mut Self;
}
impl Clone for OpenOptions {
fn clone(&self) -> Self;
}
#[cfg(unix)]
impl OpenOptionsExt for OpenOptions {
fn custom_flags(&mut self, flags: i32) -> &mut Self;
fn mode(&mut self, mode: u32) -> &mut Self;
}
#[cfg(windows)]
impl OpenOptionsExt for OpenOptions {
fn access_mode(&mut self, access: u32) -> &mut Self;
fn share_mode(&mut self, val: u32) -> &mut Self;
fn custom_flags(&mut self, flags: u32) -> &mut Self;
fn attributes(&mut self, val: u32) -> &mut Self;
fn security_qos_flags(&mut self, flags: u32) -> &mut Self;
}
}
@@ -1,7 +1,4 @@
use std::io;
#[cfg(not(test))]
use std::os::unix::fs::OpenOptionsExt;
use std::{io, os::unix::fs::OpenOptionsExt};
#[cfg(test)]
use super::mock_open_options::MockOpenOptions as StdOpenOptions;