add more undefined behaviour

This commit is contained in:
psykose 2024-10-31 21:41:02 +01:00
parent dee7c2e396
commit b3b0160497

View file

@ -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