mirror of
https://github.com/eyre-rs/eyre.git
synced 2025-10-02 07:21:36 +00:00
Test null pointer optimization of Result<(), Error>
This commit is contained in:
parent
63f14dbd49
commit
95e25cf787
@ -13,6 +13,11 @@ fn test_error_size() {
|
|||||||
assert_eq!(mem::size_of::<Error>(), mem::size_of::<usize>());
|
assert_eq!(mem::size_of::<Error>(), mem::size_of::<usize>());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn test_null_pointer_optimization() {
|
||||||
|
assert_eq!(mem::size_of::<Result<(), Error>>(), mem::size_of::<usize>());
|
||||||
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_autotraits() {
|
fn test_autotraits() {
|
||||||
fn assert<E: Unpin + Send + Sync + 'static>() {}
|
fn assert<E: Unpin + Send + Sync + 'static>() {}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user