Skip to content

Commit

Permalink
Implement HasMemory for box types
Browse files Browse the repository at this point in the history
  • Loading branch information
drewcrawford committed Jun 7, 2024
1 parent a58e872 commit 36a9351
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/external_data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,13 @@ impl HasMemory for String {
}
}

impl HasMemory for Box<[u8]> {
fn as_slice(&self) -> &[u8] {
self.as_ref()
}

}



///Wraps a dispatch data that points to external memory (such as Rust memory)
Expand Down

0 comments on commit 36a9351

Please sign in to comment.