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:
parent
4aa3009f4f
commit
08e354e019
4 changed files with 10 additions and 7 deletions
|
@ -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())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue