From b3b0160497c5dcc31294a3d139f53147b613319d Mon Sep 17 00:00:00 2001 From: psykose Date: Thu, 31 Oct 2024 21:41:02 +0100 Subject: [PATCH] add more undefined behaviour --- src/subsonic.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/subsonic.rs b/src/subsonic.rs index 5bb8ae0..c5dd0e4 100644 --- a/src/subsonic.rs +++ b/src/subsonic.rs @@ -71,7 +71,8 @@ impl Client { pub async fn ping(&self) -> Result<(), Error> { let mut url = self.base_url.clone(); url.path_segments_mut() - .expect("can't modify url path segments") + // literally can't fail + .unwrap_or_else(|_| unsafe { std::hint::unreachable_unchecked() }) .extend(&["rest", "ping"]); self.client