Skip to content

Commit 3a1e352

Browse files
committed
fix: borrow env vars for split_paths
1 parent 529bcfe commit 3a1e352

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src-tauri/src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ fn configure_gstreamer_environment() {
6767
};
6868

6969
if let Ok(existing) = env::var("GST_PLUGIN_PATH") {
70-
for entry in env::split_paths(existing) {
70+
for entry in env::split_paths(&existing) {
7171
add_plugin_path(entry);
7272
}
7373
}
@@ -85,7 +85,7 @@ fn configure_gstreamer_environment() {
8585
};
8686

8787
if let Ok(existing) = env::var("LD_LIBRARY_PATH") {
88-
for entry in env::split_paths(existing) {
88+
for entry in env::split_paths(&existing) {
8989
add_library_path(entry);
9090
}
9191
}
@@ -121,7 +121,7 @@ fn configure_gstreamer_environment() {
121121
let gstreamer_bin = app_dir_path.join("resources/gstreamer/bin");
122122
if gstreamer_bin.exists() {
123123
let path_var = env::var("PATH").unwrap_or_default();
124-
let mut path_entries: Vec<PathBuf> = env::split_paths(path_var).collect();
124+
let mut path_entries: Vec<PathBuf> = env::split_paths(&path_var).collect();
125125
if !path_entries.iter().any(|p| p == &gstreamer_bin) {
126126
path_entries.insert(0, gstreamer_bin.clone());
127127
if let Ok(joined_path) = env::join_paths(path_entries.iter()) {

0 commit comments

Comments
 (0)