1
0
Fork 0
mirror of https://github.com/Zedfrigg/ironbar.git synced 2025-07-04 04:01:03 +02:00

refactor: fix new clippy warnings

This commit is contained in:
Jake Stanger 2023-10-19 21:11:56 +01:00
parent 4aa3009f4f
commit 08e354e019
No known key found for this signature in database
GPG key ID: C51FC8F9CB0BEA61
4 changed files with 10 additions and 7 deletions

View file

@ -205,7 +205,7 @@ impl Script {
Ok(output) => callback(output.0, output.1),
Err(err) => error!("{err:?}"),
},
ScriptMode::Watch => match self.spawn().await {
ScriptMode::Watch => match self.spawn() {
Ok(mut rx) => {
while let Some(msg) = rx.recv().await {
callback(msg, true);
@ -264,7 +264,7 @@ impl Script {
/// Spawns a long-running process.
/// Returns a `mpsc::Receiver` that sends a message
/// every time a new line is written to `stdout` or `stderr`.
pub async fn spawn(&self) -> Result<mpsc::Receiver<OutputStream>> {
pub fn spawn(&self) -> Result<mpsc::Receiver<OutputStream>> {
let mut handle = Command::new("/bin/sh")
.args(["-c", &self.cmd])
.stdout(Stdio::piped())