refactor: remove redundant references

This commit is contained in:
Hamir Mahal 2024-06-06 15:18:41 -07:00
parent 13c6ea3e13
commit 57fab3a927
No known key found for this signature in database
2 changed files with 3 additions and 3 deletions

View File

@ -81,7 +81,7 @@ pub fn get(selection: &str, key: &str) -> String {
.join("blue-recorder")
.join("config.ini");
String::from(
Ini::load_from_file(&config_path)
Ini::load_from_file(config_path)
.unwrap()
.with_section(Some(selection))
.get(key)

View File

@ -144,12 +144,12 @@ pub fn build_ui(application: &Application) {
// Get audio sources
let sources_descriptions: Vec<String> = {
let list_sources_child = Command::new("pactl")
.args(&["list", "sources"])
.args(["list", "sources"])
.stdout(Stdio::piped())
.spawn();
let sources_descriptions = String::from_utf8(if let Ok(..) = list_sources_child {
Command::new("grep")
.args(&["-e", "device.description"])
.args(["-e", "device.description"])
.stdin(list_sources_child.unwrap().stdout.take().unwrap())
.output()
.unwrap()