Skip to content

Commit 8dff0df

Browse files
committed
Use std pipe
1 parent 5ee7dfb commit 8dff0df

File tree

4 files changed

+15
-27
lines changed

4 files changed

+15
-27
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
### Changed
44

55
- Upgrade to Rust edition 2024
6-
- Raise the minimum supported Rust version to `1.85`
6+
- Raise the minimum supported Rust version to `1.87`
77

88
<a name="6.4.0"></a>
99

Cargo.lock

Lines changed: 11 additions & 22 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ authors = [
1616
repository = "https://github.com/rust-lang/rustlings"
1717
license = "MIT"
1818
edition = "2024" # On Update: Update the edition of `rustfmt` in `dev check` and `CARGO_TOML` in `dev new`.
19-
rust-version = "1.85"
19+
rust-version = "1.87"
2020

2121
[workspace.dependencies]
2222
serde = { version = "1.0", features = ["derive"] }
@@ -50,7 +50,6 @@ anyhow = "1.0"
5050
clap = { version = "4.5", features = ["derive"] }
5151
crossterm = { version = "0.29", default-features = false, features = ["windows", "events"] }
5252
notify = "8.0"
53-
os_pipe = "1.2"
5453
rustlings-macros = { path = "rustlings-macros", version = "=6.4.0" }
5554
serde_json = "1.0"
5655
serde.workspace = true

src/cmd.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use anyhow::{Context, Result, bail};
22
use serde::Deserialize;
33
use std::{
4-
io::Read,
4+
io::{Read, pipe},
55
path::PathBuf,
66
process::{Command, Stdio},
77
};
@@ -17,7 +17,7 @@ fn run_cmd(mut cmd: Command, description: &str, output: Option<&mut Vec<u8>>) ->
1717
};
1818

1919
let mut handle = if let Some(output) = output {
20-
let (mut reader, writer) = os_pipe::pipe().with_context(|| {
20+
let (mut reader, writer) = pipe().with_context(|| {
2121
format!("Failed to create a pipe to run the command `{description}``")
2222
})?;
2323

0 commit comments

Comments
 (0)