Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## Upcoming version

- [[#266](https://github.com/rust-vmm/vm-memory/pull/266)] Derive `Debug` for several
types that were missing it.

## [v0.13.1]

### Added
Expand Down
2 changes: 1 addition & 1 deletion coverage_config_x86_64.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"coverage_score": 86.72,
"coverage_score": 86.07,
"exclude_path": "mmap_windows.rs",
"crate_features": "backend-mmap,backend-atomic,backend-bitmap"
}
1 change: 1 addition & 0 deletions src/atomic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ impl<M: GuestMemory> Deref for GuestMemoryLoadGuard<M> {
/// this structure is dropped (falls out of scope) the lock will be unlocked,
/// possibly after updating the memory map represented by the
/// `GuestMemoryAtomic` that created the guard.
#[derive(Debug)]
pub struct GuestMemoryExclusiveGuard<'a, M: GuestMemory> {
parent: &'a GuestMemoryAtomic<M>,
_guard: MutexGuard<'a, ()>,
Expand Down
1 change: 1 addition & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

#![deny(clippy::doc_markdown)]
#![deny(missing_docs)]
#![deny(missing_debug_implementations)]

#[macro_use]
pub mod address;
Expand Down
1 change: 1 addition & 0 deletions src/mmap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -616,6 +616,7 @@ impl<B: Bitmap> GuestMemoryMmap<B> {
/// An iterator over the elements of `GuestMemoryMmap`.
///
/// This struct is created by `GuestMemory::iter()`. See its documentation for more.
#[derive(Debug)]
pub struct Iter<'a, B>(std::slice::Iter<'a, Arc<GuestRegionMmap<B>>>);

impl<'a, B> Iterator for Iter<'a, B> {
Expand Down
1 change: 1 addition & 0 deletions src/mmap_unix.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ pub enum Error {
pub type Result<T> = result::Result<T, Error>;

/// A factory struct to build `MmapRegion` objects.
#[derive(Debug)]
pub struct MmapRegionBuilder<B = ()> {
size: usize,
prot: i32,
Expand Down
2 changes: 2 additions & 0 deletions src/volatile_memory.rs
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,7 @@ impl<'a> From<&'a mut [u8]> for VolatileSlice<'a, ()> {
struct Packed<T>(T);

/// A guard to perform mapping and protect unmapping of the memory.
#[derive(Debug)]
pub struct PtrGuard {
addr: *mut u8,
len: usize,
Expand Down Expand Up @@ -347,6 +348,7 @@ impl PtrGuard {
}

/// A mutable guard to perform mapping and protect unmapping of the memory.
#[derive(Debug)]
pub struct PtrGuardMut(PtrGuard);

#[allow(clippy::len_without_is_empty)]
Expand Down