tests: only use PipeWriter if rust-version >= 1.87

By using conditional compilation, we now support running the test suite
with Rust versions 1.83 to 1.86 again. This allows us to lower the
`rust-version` specified in the root Cargo.toml (because it was
controlling the toolchain used in CI) to 1.83, resolving #230.

This solution keeps tests operational on our MSRV while also lowering
it. It would have been unsatisfying to have an MSRV which could not
compile the tests.

`rustversion` was selected as the dependency to control the conditional
compilation since it was already a build dependency needed by
`vergen-gitcl`, so no new dependencies were added.
This commit is contained in:
En-En 2025-09-02 14:42:34 +00:00 committed by Supreeeme
parent c0497c990d
commit 0fd0dd75e9
4 changed files with 38 additions and 10 deletions

View file

@ -11,3 +11,4 @@ wayland-protocols = { workspace = true, features = ["server", "staging", "unstab
wayland-server.workspace = true
wl_drm = { path = "../wl_drm" }
rustix = { workspace = true, features = ["pipe"] }
rustversion = "1.0.22"