From f2625965b3e5d5dd5a66822d3b2829aa08ffcfa3 Mon Sep 17 00:00:00 2001 From: Roderick van Domburg Date: Sat, 22 Jan 2022 21:13:11 +0100 Subject: [PATCH] Count from the start for stability --- connect/src/spirc.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/connect/src/spirc.rs b/connect/src/spirc.rs index 1cc07cde..bea95c57 100644 --- a/connect/src/spirc.rs +++ b/connect/src/spirc.rs @@ -281,7 +281,7 @@ impl Spirc { .flatten_stream() .map(|response| -> Result<(String, Frame), Error> { let uri_split: Vec<&str> = response.uri.split('/').collect(); - let username = match uri_split.get(uri_split.len() - 2) { + let username = match uri_split.get(4) { Some(s) => s.to_string(), None => String::new(), };