chiark / gitweb /
Replace from_str_radix with FromStr/parse
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 4 Feb 2024 12:37:30 +0000 (12:37 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 4 Feb 2024 14:24:38 +0000 (14:24 +0000)
src/client.rs

index 8b8e35f8a3144c3a96b1d5a60aac5100ee46e838..08e0e10e14a0a363277e0131380f9df9c7cb0a56 100644 (file)
@@ -1725,7 +1725,7 @@ impl Client {
         &self,
         id: &str,
     ) -> (ClientError, DateTime<Utc>) {
-        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()