Skip to content

Commit 2e00ca6

Browse files
committed
Fix comment on CodeMemory::text_mut.
1 parent 57a109e commit 2e00ca6

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

crates/wasmtime/src/runtime/code_memory.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -470,7 +470,14 @@ impl CodeMemory {
470470
}
471471
}
472472

473-
/// Temporarily edit the code with the given closure.
473+
/// Return a mutable borrow to the code, suitable for editing.
474+
///
475+
/// Must not be published.
476+
///
477+
/// # Panics
478+
///
479+
/// This method panics if the code has been published (and not
480+
/// subsequently unpublished).
474481
pub fn text_mut(&mut self) -> &mut [u8] {
475482
assert!(!self.published);
476483
// SAFETY: we assert !published, which means we either have

0 commit comments

Comments
 (0)