mirror of
https://github.com/crossterm-rs/crossterm.git
synced 2025-05-05 15:32:57 +00:00
Fix build failure with event-stream, rustix, and use-dev-tty (#955)
This commit is contained in:
parent
fe96fefd41
commit
1bcfa9729c
2
.github/workflows/crossterm_test.yml
vendored
2
.github/workflows/crossterm_test.yml
vendored
@ -68,7 +68,7 @@ jobs:
|
||||
continue-on-error: ${{ matrix.can-fail }}
|
||||
- name: Test no default features with use-dev-tty feature enabled
|
||||
if: matrix.os != 'windows-2019'
|
||||
run: cargo test --no-default-features --features "use-dev-tty events bracketed-paste" -- --nocapture --test-threads 1
|
||||
run: cargo test --no-default-features --features "use-dev-tty events event-stream bracketed-paste" -- --nocapture --test-threads 1
|
||||
continue-on-error: ${{ matrix.can-fail }}
|
||||
- name: Test no default features with windows feature enabled
|
||||
if: matrix.os == 'windows-2019'
|
||||
|
@ -185,7 +185,10 @@ impl EventSource for UnixInternalEventSource {
|
||||
|
||||
#[cfg(feature = "event-stream")]
|
||||
if fds[2].revents & POLLIN != 0 {
|
||||
#[cfg(feature = "libc")]
|
||||
let fd = FileDesc::new(self.wake_pipe.receiver.as_raw_fd(), false);
|
||||
#[cfg(not(feature = "libc"))]
|
||||
let fd = FileDesc::Borrowed(self.wake_pipe.receiver.as_fd());
|
||||
// drain the pipe
|
||||
while read_complete(&fd, &mut [0; 1024])? != 0 {}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user