Skip to content

Commit 0b6dd5a

Browse files
committed
fix: dyn_memory example
1 parent d4306de commit 0b6dd5a

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

examples/dyn_memory/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ fn main() -> Result<(), Box<dyn Error + Send + Sync>> {
2828
#[raw_struct(memory = "([u8; 0x10], T)")]
2929
struct Container<T>
3030
where
31-
T: marker::Copy + 'static,
31+
T: marker::Copy + Send + Sync + 'static,
3232
{
3333
#[field(offset = 0x00)]
3434
pub var_a: u64,

raw_struct/src/builtins/array.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,10 @@ use crate::{
2222
Viewable,
2323
};
2424

25+
#[allow(clippy::len_without_is_empty)]
2526
pub trait Array<T: ?Sized> {
2627
fn start_address(&self) -> u64;
28+
2729
fn len(&self) -> Option<usize>;
2830
}
2931

0 commit comments

Comments
 (0)