From: Ian Jackson Date: Sun, 4 Feb 2024 12:37:30 +0000 (+0000) Subject: Replace from_str_radix with FromStr/parse X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?a=commitdiff_plain;h=7c0a6ebabe6410c1d10074121d430b0e25402b1f;p=mastodonochrome.git Replace from_str_radix with FromStr/parse --- diff --git a/src/client.rs b/src/client.rs index 8b8e35f..08e0e10 100644 --- a/src/client.rs +++ b/src/client.rs @@ -1725,7 +1725,7 @@ impl Client { &self, id: &str, ) -> (ClientError, DateTime) { - let index = isize::from_str_radix(id, 10).expect( + let index: isize = id.parse().expect( "We generated these ids ourselves and they should all be valid", ); self.error_log.items[(index - self.error_log.origin) as usize].clone()