mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2024-11-25 05:03:05 +00:00
volatile_memory: Fix usize/u64 confusion in doc test
VolatileMemory::size() now returns a u64, fix the doctest so it compares the returned value with a u64. BUG=none TEST=cargo test --all -- --test-threads=1 Change-Id: If1ae94d83bfc1f2f995fd71bfdede324c162ab4e Signed-off-by: Dylan Reid <dgreid@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/902777 Reviewed-by: Stephen Barber <smbarber@chromium.org> Reviewed-by: Sonny Rao <sonnyrao@chromium.org>
This commit is contained in:
parent
6cc352f4fa
commit
2f307b2f3f
1 changed files with 1 additions and 1 deletions
|
@ -394,7 +394,7 @@ impl<'a, T: DataInit> VolatileRef<'a, T> {
|
|||
/// # use std::mem::size_of;
|
||||
/// # use data_model::VolatileRef;
|
||||
/// let v_ref = unsafe { VolatileRef::new(0 as *mut u32) };
|
||||
/// assert_eq!(v_ref.size(), size_of::<u32>());
|
||||
/// assert_eq!(v_ref.size(), size_of::<u32>() as u64);
|
||||
/// ```
|
||||
pub fn size(&self) -> u64 {
|
||||
size_of::<T>() as u64
|
||||
|
|
Loading…
Reference in a new issue