Skip to content
Open
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: 2 additions & 3 deletions src/address_space.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,14 +79,14 @@ impl AddressSpace {

/// Look up the DataSource and offset within that DataSource for a
/// VirtualAddress / AccessType in this AddressSpace
///
///
/// # Errors
/// If this VirtualAddress does not have a valid mapping in &self,
/// or if this AccessType is not permitted by the mapping
pub fn get_source_for_addr<D: DataSource>(
&self,
addr: VirtualAddress,
access_type: FlagBuilder
access_type: FlagBuilder,
) -> Result<(&D, usize), &str> {
todo!();
}
Expand Down Expand Up @@ -218,4 +218,3 @@ impl FlagBuilder {
}
}
}

4 changes: 3 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ mod tests {
let offset: usize = 0;
let length: usize = 1;

let addr = addr_space.add_mapping(&data_source, offset, length).unwrap();
let addr = addr_space
.add_mapping(&data_source, offset, length)
.unwrap();
assert!(addr != 0);

// we should move these tests into addr_space, since they access non-public internals of the structure:
Expand Down