doc(runtime-core) Replace map(|cell| cell.get()) by map(Cell::get).

Because it's simpler :-p.
This commit is contained in:
Ivan Enderlin
2019-09-23 15:15:06 +02:00
parent 174cc9f0ec
commit f289cb2ba9

View File

@ -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);
/// } /// }
/// ///