mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2024-11-24 20:48:55 +00:00
base: fix mmap doc test on Windows.
MemoryMappingBuilder on Windows has to be built from SharedMemory. On Linux we can build without one. We should fix this API discrepency at some point, but for the moment let's get the test working again. BUG=b:267219257 TEST=the fixed test passes downstream. Change-Id: If9728f2b73465a30aa324549fbc10e189737b420 Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4220528 Reviewed-by: Vikram Auradkar <auradkar@google.com> Commit-Queue: Noah Gold <nkgold@google.com>
This commit is contained in:
parent
3d01498e99
commit
c7041e707c
1 changed files with 3 additions and 1 deletions
|
@ -144,7 +144,9 @@ impl MemoryMapping {
|
|||
///
|
||||
/// ```
|
||||
/// # use base::MemoryMappingBuilder;
|
||||
/// # let mut mem_map = MemoryMappingBuilder::new(1024).build().unwrap();
|
||||
/// # use base::SharedMemory;
|
||||
/// # let shm = SharedMemory::new("test", 1024).unwrap();
|
||||
/// # let mut mem_map = MemoryMappingBuilder::new(1024).from_shared_memory(&shm).build().unwrap();
|
||||
/// let res = mem_map.write_obj(55u64, 16);
|
||||
/// assert!(res.is_ok());
|
||||
/// ```
|
||||
|
|
Loading…
Reference in a new issue