mirror of
https://github.com/xlmnxp/blue-recorder.git
synced 2024-11-23 17:13:11 +03:00
refactor: remove redundant references
This commit is contained in:
parent
13c6ea3e13
commit
57fab3a927
@ -81,7 +81,7 @@ pub fn get(selection: &str, key: &str) -> String {
|
|||||||
.join("blue-recorder")
|
.join("blue-recorder")
|
||||||
.join("config.ini");
|
.join("config.ini");
|
||||||
String::from(
|
String::from(
|
||||||
Ini::load_from_file(&config_path)
|
Ini::load_from_file(config_path)
|
||||||
.unwrap()
|
.unwrap()
|
||||||
.with_section(Some(selection))
|
.with_section(Some(selection))
|
||||||
.get(key)
|
.get(key)
|
||||||
|
@ -144,12 +144,12 @@ pub fn build_ui(application: &Application) {
|
|||||||
// Get audio sources
|
// Get audio sources
|
||||||
let sources_descriptions: Vec<String> = {
|
let sources_descriptions: Vec<String> = {
|
||||||
let list_sources_child = Command::new("pactl")
|
let list_sources_child = Command::new("pactl")
|
||||||
.args(&["list", "sources"])
|
.args(["list", "sources"])
|
||||||
.stdout(Stdio::piped())
|
.stdout(Stdio::piped())
|
||||||
.spawn();
|
.spawn();
|
||||||
let sources_descriptions = String::from_utf8(if let Ok(..) = list_sources_child {
|
let sources_descriptions = String::from_utf8(if let Ok(..) = list_sources_child {
|
||||||
Command::new("grep")
|
Command::new("grep")
|
||||||
.args(&["-e", "device.description"])
|
.args(["-e", "device.description"])
|
||||||
.stdin(list_sources_child.unwrap().stdout.take().unwrap())
|
.stdin(list_sources_child.unwrap().stdout.take().unwrap())
|
||||||
.output()
|
.output()
|
||||||
.unwrap()
|
.unwrap()
|
||||||
|
Loading…
Reference in New Issue
Block a user