Update src/zeroable.rs

Co-Authored-By: Daniel Henry-Mantilla <daniel.henry.mantilla@gmail.com>
This commit is contained in:
Lokathor 2019-09-20 11:10:01 -06:00 committed by GitHub
parent ca902ff52d
commit d4fde53386
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -14,6 +14,7 @@ pub unsafe trait Zeroable: Sized {
/// This is a trait method so that you can write `MyType::zeroed()` in your
/// code. It is a contract of this trait that if you implement it on your type
/// you **must not** override this method.
#[inline]
fn zeroed() -> Self {
unsafe { core::mem::zeroed() }
}