mirror of
https://github.com/fluencelabs/wasmer
synced 2025-06-26 15:11:37 +00:00
doc(runtime-core) Replace map(|cell| cell.get())
by map(Cell::get)
.
Because it's simpler :-p.
This commit is contained in:
@ -131,11 +131,11 @@ impl Memory {
|
|||||||
///
|
///
|
||||||
/// ```
|
/// ```
|
||||||
/// # use wasmer_runtime_core::memory::{Memory, MemoryView};
|
/// # use wasmer_runtime_core::memory::{Memory, MemoryView};
|
||||||
/// # use std::sync::atomic::Ordering;
|
/// # use std::{cell::Cell, sync::atomic::Ordering};
|
||||||
/// # fn view_memory(memory: Memory) {
|
/// # fn view_memory(memory: Memory) {
|
||||||
/// // Without synchronization.
|
/// // Without synchronization.
|
||||||
/// let view: MemoryView<u8> = memory.view();
|
/// let view: MemoryView<u8> = memory.view();
|
||||||
/// for byte in view[0x1000 .. 0x1010].iter().map(|cell| cell.get()) {
|
/// for byte in view[0x1000 .. 0x1010].iter().map(Cell::get) {
|
||||||
/// println!("byte: {}", byte);
|
/// println!("byte: {}", byte);
|
||||||
/// }
|
/// }
|
||||||
///
|
///
|
||||||
|
Reference in New Issue
Block a user