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 44c44ba commit 45796ebCopy full SHA for 45796eb
crates/cust/src/module.rs
@@ -340,7 +340,8 @@ impl Module {
340
///
341
/// # Panics:
342
343
- /// 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
344
+ /// `mem::sizeof<T>()`.
345
346
/// # Examples
347
@@ -375,7 +376,7 @@ impl Module {
375
376
name.as_ptr(),
377
)
378
.to_result()?;
- assert_eq!(size, mem::size_of::<T>());
379
+ assert!(size <= mem::size_of::<T>());
380
Ok(Symbol {
381
ptr,
382
module: PhantomData,
0 commit comments