From fc018bc4f5b12b6743eaff6d3a5f488b05fe7da5 Mon Sep 17 00:00:00 2001 From: Diggory Hardy Date: Mon, 25 Nov 2024 13:59:25 +0000 Subject: [PATCH] Fix comment and further uses of core::error::Error --- rand_core/src/os.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/rand_core/src/os.rs b/rand_core/src/os.rs index 9119aa3daa..44efe700c1 100644 --- a/rand_core/src/os.rs +++ b/rand_core/src/os.rs @@ -58,12 +58,12 @@ impl core::fmt::Display for OsError { } } -// NOTE: this should not require std; see getrandom#545 +// NOTE: this can use core::error::Error from rustc 1.81.0 #[cfg(feature = "std")] impl std::error::Error for OsError { #[inline] - fn source(&self) -> Option<&(dyn core::error::Error + 'static)> { - core::error::Error::source(&self.0) + fn source(&self) -> Option<&(dyn std::error::Error + 'static)> { + std::error::Error::source(&self.0) } }