From e7aefd606af3f3d09ba23c8e6d648a6f4f3b4878 Mon Sep 17 00:00:00 2001 From: Josh McKinney Date: Sun, 5 May 2024 03:31:27 -0700 Subject: [PATCH] fix: ensure key-display example requires events feature flag --- Cargo.toml | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 32006e52..2c53c14b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -28,18 +28,28 @@ all-features = true # [features] default = ["bracketed-paste", "windows", "events"] -windows = ["dep:winapi", "dep:crossterm_winapi"] # Disables winapi dependencies from being included into the binary (SHOULD NOT be disabled on windows). -bracketed-paste = [] # Enables triggering a `Event::Paste` when pasting text into the terminal. +windows = [ + "dep:winapi", + "dep:crossterm_winapi", +] # Disables winapi dependencies from being included into the binary (SHOULD NOT be disabled on windows). +bracketed-paste = [ +] # Enables triggering a `Event::Paste` when pasting text into the terminal. event-stream = ["dep:futures-core", "events"] # Enables async events -use-dev-tty = ["filedescriptor"] # Enables raw file descriptor polling / selecting instead of mio. -events = ["dep:mio", "dep:signal-hook", "dep:signal-hook-mio"] # Enables reading input/events from the system. +use-dev-tty = [ + "filedescriptor", +] # Enables raw file descriptor polling / selecting instead of mio. +events = [ + "dep:mio", + "dep:signal-hook", + "dep:signal-hook-mio", +] # Enables reading input/events from the system. serde = ["dep:serde", "bitflags/serde"] # Enables 'serde' for various types. # # Shared dependencies # [dependencies] -bitflags = {version = "2.3" } +bitflags = { version = "2.3" } parking_lot = "0.12" # optional deps only added when requested @@ -65,7 +75,9 @@ libc = "0.2" signal-hook = { version = "0.3.17", optional = true } filedescriptor = { version = "0.8", optional = true } mio = { version = "0.8", features = ["os-poll"], optional = true } -signal-hook-mio = { version = "0.2.3", features = ["support-v0_8"], optional = true } +signal-hook-mio = { version = "0.2.3", features = [ + "support-v0_8", +], optional = true } # # Dev dependencies (examples, ...) @@ -108,3 +120,7 @@ required-features = ["events"] [[example]] name = "stderr" required-features = ["events"] + +[[example]] +name = "key-display" +required-features = ["events"]