We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a51d85f commit 3ae109aCopy full SHA for 3ae109a
crates/cust/src/module.rs
@@ -362,7 +362,8 @@ impl Module {
362
///
363
/// # Panics:
364
365
- /// This function panics if the size of the symbol is not the same as the `mem::sizeof<T>()`.
+ /// This function panics if the size of the symbol is greater than
366
+ /// `mem::sizeof<T>()`.
367
368
/// # Examples
369
@@ -397,7 +398,7 @@ impl Module {
397
398
name.as_ptr(),
399
)
400
.to_result()?;
- assert_eq!(size, mem::size_of::<T>());
401
+ assert!(size <= mem::size_of::<T>());
402
Ok(Symbol {
403
ptr,
404
module: PhantomData,
0 commit comments