Skip to content

Commit 77f074f

Browse files
committed
feat: removed Send, Sync, and 'static requirements for memory views
1 parent c956ff8 commit 77f074f

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

raw_struct/src/copy.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ use crate::{
2222
#[derive(Clone, Copy)]
2323
pub struct CopyMemory<M: marker::Copy>(pub M);
2424

25-
impl<M: marker::Copy + std::marker::Sync + std::marker::Send> MemoryView for CopyMemory<M> {
25+
impl<M: marker::Copy> MemoryView for CopyMemory<M> {
2626
type AccessError = OutOfBoundsViolation;
2727

2828
fn read_memory(&self, offset: u64, buffer: &mut [u8]) -> Result<(), Self::AccessError> {

raw_struct/src/memory.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ use crate::{
1313
MemoryDecodeError,
1414
};
1515

16-
pub trait MemoryView: Send + Sync {
17-
type AccessError: 'static;
16+
pub trait MemoryView {
17+
type AccessError;
1818

1919
fn read_memory(&self, offset: u64, buffer: &mut [u8]) -> Result<(), Self::AccessError>;
2020
}

raw_struct/src/view.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ pub trait Viewable {
1515
}
1616

1717
pub trait SizedViewable: Viewable {
18-
type Memory: Clone + Copy + Send + Sync;
18+
type Memory: Clone + Copy;
1919

2020
fn memory_size() -> usize {
2121
mem::size_of::<Self::Memory>()

0 commit comments

Comments
 (0)