From 7c79468eda856e04b12304571c67895f243a3acb Mon Sep 17 00:00:00 2001 From: Vinzenz Schroeter Date: Thu, 13 Feb 2025 18:38:07 +0100 Subject: [PATCH 1/2] install libpipewire, libdbus and libclang in CI --- .github/workflows/rust.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 62304ee..e944336 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -26,7 +26,7 @@ jobs: - name: Install rust toolchain run: sudo apt-get install -qy cargo-1.80 rust-1.80-clippy - name: Install system dependencies - run: sudo apt-get install -qy liblzma-dev + run: sudo apt-get install -qy liblzma-dev libpipewire-0.3-dev libclang-dev libdbus-1-dev - name: Run Clippy run: cargo clippy --all-targets --all-features -- 2.47.0 From 542bd19acef86df66b22ffe6c5a0c52d50c9e32f Mon Sep 17 00:00:00 2001 From: Vinzenz Schroeter Date: Thu, 13 Feb 2025 19:14:46 +0100 Subject: [PATCH 2/2] fix warning --- src/execute.rs | 2 +- src/stream_stdin.rs | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/execute.rs b/src/execute.rs index 9859d3f..ad91eba 100644 --- a/src/execute.rs +++ b/src/execute.rs @@ -13,7 +13,7 @@ pub fn execute_mode(mode: Mode, connection: Connection) { Mode::Pixels { pixel_command } => pixels(&connection, pixel_command), Mode::Brightness { brightness_command } => brightness(&connection, brightness_command), Mode::Stream { stream_command } => match stream_command { - StreamCommand::Stdin { slow } => stream_stdin(&connection, slow), + StreamCommand::Stdin { slow } => stream_stdin(connection, slow), StreamCommand::Screen { options } => stream_window(&connection, options), }, } diff --git a/src/stream_stdin.rs b/src/stream_stdin.rs index 5949906..a349aa2 100644 --- a/src/stream_stdin.rs +++ b/src/stream_stdin.rs @@ -2,7 +2,7 @@ use log::warn; use servicepoint::*; use std::thread::sleep; -pub(crate) fn stream_stdin(connection: &Connection, slow: bool) { +pub(crate) fn stream_stdin(connection: Connection, slow: bool) { warn!("This mode will break when using multi-byte characters and does not support ANSI escape sequences yet."); let mut app = App { connection, @@ -13,14 +13,14 @@ pub(crate) fn stream_stdin(connection: &Connection, slow: bool) { app.run() } -struct App<'t> { - connection: &'t Connection, +struct App { + connection: Connection, mirror: CharGrid, y: usize, slow: bool, } -impl<'t> App<'t> { +impl App { fn run(&mut self) { self.connection .send(Command::Clear) -- 2.47.0