Description: Support multiple enabled backends in demo
 This patch allows to build the demo even if multiple backends are enabled.
Author: Johann Felix Soden <johfel@debian.org>
Forwarded: not-needed
Last-Update: 2023-07-14
---
--- a/examples/demo/main.rs
+++ b/examples/demo/main.rs
@@ -5,9 +5,9 @@
 mod app;
 #[cfg(feature = "crossterm")]
 mod crossterm;
-#[cfg(feature = "termion")]
+#[cfg(all(feature = "termion", not(feature = "crossterm"), not(feature = "termwiz")))]
 mod termion;
-#[cfg(feature = "termwiz")]
+#[cfg(all(feature = "termwiz", not(feature = "crossterm"), not(feature = "termion")))]
 mod termwiz;
 
 mod ui;
@@ -28,9 +28,9 @@
     let tick_rate = Duration::from_millis(cli.tick_rate);
     #[cfg(feature = "crossterm")]
     crate::crossterm::run(tick_rate, cli.enhanced_graphics)?;
-    #[cfg(feature = "termion")]
+    #[cfg(all(feature = "termion", not(feature = "crossterm"), not(feature = "termwiz")))]
     crate::termion::run(tick_rate, cli.enhanced_graphics)?;
-    #[cfg(feature = "termwiz")]
+    #[cfg(all(feature = "termwiz", not(feature = "crossterm"), not(feature = "termion")))]
     crate::termwiz::run(tick_rate, cli.enhanced_graphics)?;
     Ok(())
 }
