mirror of
https://github.com/TECHNOFAB11/pay-respects.git
synced 2025-12-12 06:20:09 +01:00
clean: remove operations not actively used
This commit is contained in:
parent
ead711f504
commit
754214ede3
3 changed files with 12 additions and 19 deletions
19
src/shell.rs
19
src/shell.rs
|
|
@ -26,22 +26,9 @@ pub fn command_output(shell: &str, command: &str) -> String {
|
|||
});
|
||||
|
||||
match receiver.recv_timeout(Duration::from_secs(3)) {
|
||||
Ok(output) => {
|
||||
if !output.stderr.is_empty() {
|
||||
String::from_utf8_lossy(&output.stderr)
|
||||
.to_string()
|
||||
.split_whitespace()
|
||||
.collect::<Vec<&str>>()
|
||||
.join(" ")
|
||||
.to_lowercase()
|
||||
} else {
|
||||
String::from_utf8_lossy(&output.stdout)
|
||||
.to_string()
|
||||
.split_whitespace()
|
||||
.collect::<Vec<&str>>()
|
||||
.join(" ")
|
||||
.to_lowercase()
|
||||
}
|
||||
Ok(output) => match output.stderr.is_empty() {
|
||||
true => String::from_utf8_lossy(&output.stdout).to_lowercase(),
|
||||
false => String::from_utf8_lossy(&output.stderr).to_lowercase(),
|
||||
}
|
||||
Err(_) => {
|
||||
use colored::*;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue