From 983eb6a1f1e399b4938a2e3423e289e9e9d6e3fa Mon Sep 17 00:00:00 2001 From: Mostafa Ibrahim Date: Fri, 20 Jun 2025 11:22:34 +0300 Subject: [PATCH] remove trailing commas and whitespace --- jay-config/src/status.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/jay-config/src/status.rs b/jay-config/src/status.rs index 2cae8f49..9a382938 100644 --- a/jay-config/src/status.rs +++ b/jay-config/src/status.rs @@ -181,10 +181,13 @@ async fn handle_i3bar(name: String, mut read: BufReader>) { let mut status = String::new(); loop { read_line!(); - let mut line = line.as_str(); + let mut line = line.trim(); if let Some(l) = line.strip_prefix(",") { line = l; } + if let Some(l) = line.strip_suffix(",") { + line = l; + } let components = match serde_json::from_str::>(line) { Ok(c) => c, Err(e) => {