From d525cfc85a0fe798a85036543ccfa8858c4fbc04 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Lauren=C8=9Biu=20Nicola?= <lnicola@dend.ro>
Date: Mon, 24 May 2021 16:35:23 +0300
Subject: [PATCH] Bump object

---
 Cargo.lock                         | 12 +++---------
 crates/proc_macro_api/Cargo.toml   |  2 +-
 crates/proc_macro_srv/Cargo.toml   |  2 +-
 crates/proc_macro_srv/src/dylib.rs |  2 +-
 4 files changed, 6 insertions(+), 12 deletions(-)

diff --git a/Cargo.lock b/Cargo.lock
index bc3709d5598..0b51ce6af0a 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -81,7 +81,7 @@ dependencies = [
  "cfg-if",
  "libc",
  "miniz_oxide",
- "object 0.24.0",
+ "object",
  "rustc-demangle",
 ]
 
@@ -993,12 +993,6 @@ dependencies = [
  "libc",
 ]
 
-[[package]]
-name = "object"
-version = "0.23.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a9a7ab5d64814df0fe4a4b5ead45ed6c5f181ee3ff04ba344313a6c80446c5d4"
-
 [[package]]
 name = "object"
 version = "0.24.0"
@@ -1146,7 +1140,7 @@ dependencies = [
  "jod-thread",
  "log",
  "memmap2",
- "object 0.23.0",
+ "object",
  "profile",
  "serde",
  "serde_json",
@@ -1163,7 +1157,7 @@ dependencies = [
  "libloading",
  "mbe",
  "memmap2",
- "object 0.23.0",
+ "object",
  "proc_macro_api",
  "proc_macro_test",
  "serde_derive",
diff --git a/crates/proc_macro_api/Cargo.toml b/crates/proc_macro_api/Cargo.toml
index 2ce5eeeddc0..6fa880d6127 100644
--- a/crates/proc_macro_api/Cargo.toml
+++ b/crates/proc_macro_api/Cargo.toml
@@ -16,7 +16,7 @@ log = "0.4.8"
 crossbeam-channel = "0.5.0"
 jod-thread = "0.1.1"
 memmap2 = "0.2.0"
-object = { version = "0.23.0", default-features = false, features = ["std", "read_core", "elf", "macho", "pe", "unaligned"] }
+object = { version = "0.24", default-features = false, features = ["std", "read_core", "elf", "macho", "pe", "unaligned"] }
 snap = "1.0"
 
 tt = { path = "../tt", version = "0.0.0" }
diff --git a/crates/proc_macro_srv/Cargo.toml b/crates/proc_macro_srv/Cargo.toml
index 63b3f153223..4ea41175e88 100644
--- a/crates/proc_macro_srv/Cargo.toml
+++ b/crates/proc_macro_srv/Cargo.toml
@@ -10,7 +10,7 @@ edition = "2018"
 doctest = false
 
 [dependencies]
-object = { version = "0.23", default-features = false, features = ["std", "read_core", "elf", "macho", "pe"] }
+object = { version = "0.24", default-features = false, features = ["std", "read_core", "elf", "macho", "pe"] }
 libloading = "0.7.0"
 memmap2 = "0.2.0"
 
diff --git a/crates/proc_macro_srv/src/dylib.rs b/crates/proc_macro_srv/src/dylib.rs
index baf10fea937..cccc53220d3 100644
--- a/crates/proc_macro_srv/src/dylib.rs
+++ b/crates/proc_macro_srv/src/dylib.rs
@@ -27,7 +27,7 @@ fn find_registrar_symbol(file: &Path) -> io::Result<Option<String>> {
     let file = File::open(file)?;
     let buffer = unsafe { Mmap::map(&file)? };
 
-    Ok(object::File::parse(&buffer)
+    Ok(object::File::parse(&*buffer)
         .map_err(invalid_data_err)?
         .exports()
         .map_err(invalid_data_err)?