@@ -186,8 +186,10 @@ mod imp {
|
||||
/// service provider with the `PROV_RSA_FULL` type.
|
||||
/// - iOS: calls SecRandomCopyBytes as /dev/(u)random is sandboxed
|
||||
/// This does not block.
|
||||
#[allow(missing_copy_implementations)]
|
||||
pub struct OsRng {
|
||||
marker: marker::NoCopy
|
||||
// dummy field to ensure that this struct cannot be constructed outside of this module
|
||||
_dummy: (),
|
||||
}
|
||||
|
||||
#[repr(C)]
|
||||
@@ -205,7 +207,7 @@ mod imp {
|
||||
impl OsRng {
|
||||
/// Create a new `OsRng`.
|
||||
pub fn new() -> IoResult<OsRng> {
|
||||
Ok(OsRng {marker: marker::NoCopy} )
|
||||
Ok(OsRng { _dummy: () })
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user