From 1bd4a2ed5bd68a6973c4d8e07c4e80c170225b3c Mon Sep 17 00:00:00 2001 From: szsiggs Date: Fri, 6 Dec 2024 15:37:27 +1300 Subject: [PATCH] Fix bug where it wasn't removing the "'" --- src/tmux.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/tmux.rs b/src/tmux.rs index 36ccc60..0db369f 100644 --- a/src/tmux.rs +++ b/src/tmux.rs @@ -115,9 +115,11 @@ impl Tmux { // If the session already exists switch to it, else create the new session and then switch sessions.lines().any(|line| { + let mut cleaned_line = line.to_owned(); // tmux will return the output with extra ' and \n characters - line.to_owned().retain(|char| char != '\'' && char != '\n'); - line == repo_short_name + cleaned_line.retain(|char| char != '\'' && char != '\n'); + + cleaned_line == repo_short_name }) }