Skip to content

Commit

Permalink
perf: remove unnecessary vector allocations
Browse files Browse the repository at this point in the history
  • Loading branch information
vyfor committed May 17, 2024
1 parent 4b80246 commit 160a9d1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ipc/platform/unix_connection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ impl Connection for RichClient {
let dirs = ["XDG_RUNTIME_DIR", "TMPDIR", "TMP", "TEMP"]
.iter()
.filter_map(|&dir| var(dir).ok())
.chain(vec!["/tmp".to_string()])
.chain(["/tmp".to_string()])
.flat_map(|base| {
vec![
[
base.to_string(),
format!("{}/app/com.discordapp.Discord", base),
format!("{}/snap.discord", base),
Expand Down

0 comments on commit 160a9d1

Please sign in to comment.