From 9f7140c3dbacb4850a74521e3021f7bb02bc7a18 Mon Sep 17 00:00:00 2001 From: Luke Parker Date: Tue, 5 Dec 2023 02:50:30 -0500 Subject: [PATCH] Patch is-terminal to the std-included IsTerminal --- Cargo.lock | 7 ------- Cargo.toml | 4 ++++ patches/is-terminal/Cargo.toml | 14 ++++++++++++++ patches/is-terminal/src/lib.rs | 1 + 4 files changed, 19 insertions(+), 7 deletions(-) create mode 100644 patches/is-terminal/Cargo.toml create mode 100644 patches/is-terminal/src/lib.rs diff --git a/Cargo.lock b/Cargo.lock index 3add26f8..725ab98b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3177,13 +3177,6 @@ checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" [[package]] name = "is-terminal" version = "0.4.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bad00257d07be169d870ab665980b06cdb366d792ad690bf2e76876dc503455" -dependencies = [ - "hermit-abi", - "rustix", - "windows-sys 0.52.0", -] [[package]] name = "itertools" diff --git a/Cargo.toml b/Cargo.toml index 71e0f83e..9c5c2304 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -68,6 +68,7 @@ members = [ "tests/full-stack", "tests/reproducible-runtime", + "patches/is-terminal", "patches/option-ext", "patches/directories-next", ] @@ -99,6 +100,9 @@ lazy_static = { git = "https://github.com/rust-lang-nursery/lazy-static.rs", rev # Needed due to dockertest's usage of `Rc`s when we need `Arc`s dockertest = { git = "https://github.com/kayabaNerve/dockertest-rs", branch = "arc" } +# is-terminal now has an std-based solution with an equivalent API +is-terminal = { path = "patches/is-terminal" } + # directories-next was created because directories was unmaintained # directories-next is now unmaintained while directories is maintained # The directories author pulls in ridiculously pointless crates and prefers diff --git a/patches/is-terminal/Cargo.toml b/patches/is-terminal/Cargo.toml new file mode 100644 index 00000000..ef8f8f13 --- /dev/null +++ b/patches/is-terminal/Cargo.toml @@ -0,0 +1,14 @@ +[package] +name = "is-terminal" +version = "0.4.10" +description = "is-terminal written around std::io::IsTerminal" +license = "MIT" +repository = "https://github.com/serai-dex/serai/tree/develop/patches/is-terminal" +authors = ["Luke Parker "] +keywords = [] +edition = "2021" +rust-version = "1.70" + +[package.metadata.docs.rs] +all-features = true +rustdoc-args = ["--cfg", "docsrs"] diff --git a/patches/is-terminal/src/lib.rs b/patches/is-terminal/src/lib.rs new file mode 100644 index 00000000..e3ad95c2 --- /dev/null +++ b/patches/is-terminal/src/lib.rs @@ -0,0 +1 @@ +pub use std::io::IsTerminal;