Skip to content

Commit

Permalink
Workaround getrandom#545
Browse files Browse the repository at this point in the history
  • Loading branch information
dhardy committed Nov 25, 2024
1 parent 9f981cf commit 15e40c6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion rand_core/src/os.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,12 @@ impl core::fmt::Display for OsError {
}
}

// NOTE: this should not require std; see getrandom#545
#[cfg(feature = "std")]
impl core::error::Error for OsError {
#[inline]
fn source(&self) -> Option<&(dyn core::error::Error + 'static)> {
self.0.source()
core::error::Error::source(&self.0)
}
}

Expand Down

0 comments on commit 15e40c6

Please sign in to comment.