From f93a2ada47c1392aa81a1ad41ec5011280423bb5 Mon Sep 17 00:00:00 2001 From: Gaelan Steele Date: Mon, 4 Jan 2021 13:56:27 -0800 Subject: [PATCH] Remove TryFrom import. --- src/lib.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index c18ea949..c77dad63 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -198,7 +198,7 @@ mod v5; #[cfg(all(windows, feature = "winapi"))] mod winapi_support; -use crate::std::{convert::TryInto, fmt, str}; +use crate::std::{convert, fmt, str}; pub use crate::error::Error; @@ -390,7 +390,8 @@ impl Uuid { let d3 = u16::from(self.as_bytes()[6]) << 8 | u16::from(self.as_bytes()[7]); - let d4: &[u8; 8] = self.as_bytes()[8..16].try_into().unwrap(); + let d4: &[u8; 8] = + convert::TryInto::try_into(&self.as_bytes()[8..16]).unwrap(); (d1, d2, d3, d4) } @@ -430,7 +431,8 @@ impl Uuid { let d3 = u16::from(self.as_bytes()[6]) | u16::from(self.as_bytes()[7]) << 8; - let d4: &[u8; 8] = self.as_bytes()[8..16].try_into().unwrap(); + let d4: &[u8; 8] = + convert::TryInto::try_into(&self.as_bytes()[8..16]).unwrap(); (d1, d2, d3, d4) }