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