Skip to content

Commit

Permalink
Merge 76a3a9b into 8936d96
Browse files Browse the repository at this point in the history
  • Loading branch information
tamird committed May 24, 2023
2 parents 8936d96 + 76a3a9b commit 93e3d65
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ compiler_builtins = { version = "0.1.2", optional = true }
[dev-dependencies]
crossbeam = "0.8"
getopts = "0.2"
memmap2 = "0.5.5"
memmap2 = "0.6.1"
num_cpus = "1"
object = { version = "0.30.0", features = ["wasm"] }
rayon = "1.0"
Expand Down
6 changes: 3 additions & 3 deletions examples/dwarfdump.rs
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,7 @@ fn main() {
process::exit(1);
}
};
let mmap_ref = (*arena_mmap.alloc(mmap)).borrow();
let mmap_ref = &*arena_mmap.alloc(mmap);
match object::File::parse(&**mmap_ref) {
Ok(file) => Some(file),
Err(err) => {
Expand Down Expand Up @@ -566,7 +566,7 @@ fn empty_file_section<'input, 'arena, Endian: gimli::Endianity>(
let reader = gimli::EndianSlice::new(&[], endian);
let section = reader;
let relocations = RelocationMap::default();
let relocations = (*arena_relocations.alloc(relocations)).borrow();
let relocations = &*arena_relocations.alloc(relocations);
Relocate {
relocations,
section,
Expand Down Expand Up @@ -605,7 +605,7 @@ fn load_file_section<'input, 'arena, Endian: gimli::Endianity>(
let data_ref = (*arena_data.alloc(data)).borrow();
let reader = gimli::EndianSlice::new(data_ref, endian);
let section = reader;
let relocations = (*arena_relocations.alloc(relocations)).borrow();
let relocations = &*arena_relocations.alloc(relocations);
Ok(Relocate {
relocations,
section,
Expand Down
2 changes: 2 additions & 0 deletions src/write/unit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1378,6 +1378,7 @@ pub struct DebugInfoOffsets {

impl DebugInfoOffsets {
#[cfg(test)]
#[cfg(feature = "read")]
pub(crate) fn unit_offsets(&self, unit: UnitId) -> &UnitOffsets {
debug_assert_eq!(self.base_id, unit.base_id);
&self.units[unit.index]
Expand Down Expand Up @@ -1408,6 +1409,7 @@ pub(crate) struct UnitOffsets {

impl UnitOffsets {
#[cfg(test)]
#[cfg(feature = "read")]
fn none() -> Self {
UnitOffsets {
base_id: BaseId::default(),
Expand Down

0 comments on commit 93e3d65

Please sign in to comment.