Skip to content

Commit

Permalink
Fix comment and further uses of core::error::Error
Browse files Browse the repository at this point in the history
  • Loading branch information
dhardy committed Nov 25, 2024
1 parent 88fce45 commit fc018bc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions rand_core/src/os.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}

Expand Down

0 comments on commit fc018bc

Please sign in to comment.