Skip to content

Commit

Permalink
Remove private feature
Browse files Browse the repository at this point in the history
  • Loading branch information
bash committed Jun 7, 2024
1 parent 223e40f commit fa640f6
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ jobs:
- name: Build
run: cargo build --all-features
- name: Check fallback implementation
run: cargo check --workspace --features __test_unsupported
run: cargo check --workspace
env:
RUSTFLAGS: --cfg terminal_trx_test_unsupported
- name: Docs
run: cargo doc --all-features
lint:
Expand Down
4 changes: 1 addition & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ static_assertions = "1.1.0"
[lints.rust]
missing_debug_implementations = "warn"
missing_docs = "warn"
unexpected_cfgs = { level = "warn", check-cfg = ["cfg(terminal_trx_test_unsupported)"] }

[lints.clippy]
unimplemented = "warn"
Expand All @@ -34,6 +35,3 @@ exhaustive_enums = "warn"
exhaustive_structs = "warn"
unwrap_used = "deny"
use_debug = "warn"

[features]
__test_unsupported = []
10 changes: 5 additions & 5 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ use std::marker::PhantomData;
use std::sync::{Mutex, MutexGuard};

cfg_if! {
if #[cfg(all(unix, not(feature = "__test_unsupported")))] {
if #[cfg(all(unix, not(terminal_trx_test_unsupported)))] {
mod unix;
use unix as imp;
} else if #[cfg(all(windows, not(feature = "__test_unsupported")))] {
} else if #[cfg(all(windows, not(terminal_trx_test_unsupported)))] {
mod windows;
use windows as imp;
} else {
Expand Down Expand Up @@ -73,13 +73,13 @@ pub fn terminal() -> io::Result<Terminal> {
}

cfg_if! {
if #[cfg(all(unix, not(feature = "__test_unsupported")))] {
if #[cfg(all(unix, not(terminal_trx_test_unsupported)))] {
/// A trait for objects that are both [`io::Read`] and [`io::Write`].
pub trait Transceive:
io::Read + io::Write + std::os::fd::AsFd + std::os::fd::AsRawFd + sealed::Sealed
{
}
} else if #[cfg(all(windows, not(feature = "__test_unsupported")))] {
} else if #[cfg(all(windows, not(terminal_trx_test_unsupported)))] {
/// A trait for objects that are both [`io::Read`] and [`io::Write`].
pub trait Transceive: io::Read + io::Write + ConsoleHandles + sealed::Sealed {}
} else {
Expand All @@ -89,7 +89,7 @@ cfg_if! {
}

/// A trait to borrow the console handles from the underlying console.
#[cfg(all(windows, not(feature = "__test_unsupported")))]
#[cfg(all(windows, not(terminal_trx_test_unsupported)))]
#[cfg_attr(docsrs, doc(cfg(windows)))]
pub trait ConsoleHandles {
/// Returns a handle to the consoles's input buffer `CONIN$`.
Expand Down

0 comments on commit fa640f6

Please sign in to comment.