You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@opendal.apache.org by xu...@apache.org on 2026/01/28 11:03:26 UTC
(opendal) branch fix/remove-assert-size-tests created (now 7125bc852)
This is an automated email from the ASF dual-hosted git repository.
xuanwo pushed a change to branch fix/remove-assert-size-tests
in repository https://gitbox.apache.org/repos/asf/opendal.git
at 7125bc852 fix(core): remove assert_size tests
This branch includes the following new commits:
new 7125bc852 fix(core): remove assert_size tests
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
(opendal) 01/01: fix(core): remove assert_size tests
Posted by xu...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
xuanwo pushed a commit to branch fix/remove-assert-size-tests
in repository https://gitbox.apache.org/repos/asf/opendal.git
commit 7125bc852eeb6efce5c305198d55aec25020e365
Author: Xuanwo <gi...@xuanwo.io>
AuthorDate: Wed Jan 28 19:03:12 2026 +0800
fix(core): remove assert_size tests
---
core/core/src/lib.rs | 14 --------------
core/core/src/types/error.rs | 11 -----------
2 files changed, 25 deletions(-)
diff --git a/core/core/src/lib.rs b/core/core/src/lib.rs
index 5d9039efd..ab4d95aa5 100644
--- a/core/core/src/lib.rs
+++ b/core/core/src/lib.rs
@@ -173,21 +173,7 @@ pub mod services;
#[cfg(test)]
mod tests {
- use std::mem::size_of;
-
use super::*;
- /// This is not a real test case.
- ///
- /// We assert our public structs here to make sure we don't introduce
- /// unexpected struct/enum size change.
- #[cfg(target_pointer_width = "64")]
- #[test]
- fn assert_size() {
- assert_eq!(16, size_of::<Operator>());
- assert_eq!(360, size_of::<Entry>());
- assert_eq!(336, size_of::<Metadata>());
- assert_eq!(1, size_of::<EntryMode>());
- }
trait AssertSendSync: Send + Sync {}
impl AssertSendSync for Entry {}
diff --git a/core/core/src/types/error.rs b/core/core/src/types/error.rs
index 2639b9e1b..998cdd4c5 100644
--- a/core/core/src/types/error.rs
+++ b/core/core/src/types/error.rs
@@ -507,7 +507,6 @@ impl From<Error> for io::Error {
#[cfg(test)]
mod tests {
- use std::mem::size_of;
use std::sync::LazyLock;
use anyhow::anyhow;
@@ -528,16 +527,6 @@ mod tests {
backtrace: None,
});
- /// This is not a real test case.
- ///
- /// We assert our public structs here to make sure we don't introduce
- /// unexpected struct/enum size change.
- #[cfg(target_pointer_width = "64")]
- #[test]
- fn assert_size() {
- assert_eq!(88, size_of::<Error>());
- }
-
#[test]
fn test_error_display() {
let s = format!("{}", LazyLock::force(&TEST_ERROR));