summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Krasnitski <michael.krasnitski@gmail.com>2023-01-06 14:26:24 -0500
committerKyle Martin <krm504@nyu.edu>2023-01-10 00:11:27 -0500
commit90c6cc90b6c1e80d2f26434f37d687b39a692945 (patch)
tree041c1ec7ccacc5e1567ccf22a0d05c2157225d56
parent64713cd5b5550c5b8c61a05cc26d89d464d45bb3 (diff)
Remove unused impls of `AsRef<T> for T`
-rw-r--r--rust/src/backgroundtask.rs6
-rw-r--r--rust/src/binaryview.rs2
-rw-r--r--rust/src/debuginfo.rs12
-rw-r--r--rust/src/disassembly.rs6
-rw-r--r--rust/src/downloadprovider.rs6
-rw-r--r--rust/src/flowgraph.rs12
-rw-r--r--rust/src/metadata.rs6
-rw-r--r--rust/src/settings.rs6
-rw-r--r--rust/src/tags.rs12
9 files changed, 1 insertions, 67 deletions
diff --git a/rust/src/backgroundtask.rs b/rust/src/backgroundtask.rs
index 2557a5f3..7a24b62c 100644
--- a/rust/src/backgroundtask.rs
+++ b/rust/src/backgroundtask.rs
@@ -123,12 +123,6 @@ unsafe impl<'a> CoreArrayWrapper<'a> for BackgroundTask {
}
}
-impl AsRef<BackgroundTask> for BackgroundTask {
- fn as_ref(&self) -> &Self {
- self
- }
-}
-
impl ToOwned for BackgroundTask {
type Owned = Ref<Self>;
diff --git a/rust/src/binaryview.rs b/rust/src/binaryview.rs
index 2c9c5cc2..26b0bae2 100644
--- a/rust/src/binaryview.rs
+++ b/rust/src/binaryview.rs
@@ -743,7 +743,7 @@ pub trait BinaryViewExt: BinaryViewBase {
BNShowGraphReport(
self.as_ref().handle,
raw_name.as_ref().as_ptr() as *mut _,
- graph.as_ref().handle,
+ graph.handle,
);
}
}
diff --git a/rust/src/debuginfo.rs b/rust/src/debuginfo.rs
index 3ec0691c..36cbc5b7 100644
--- a/rust/src/debuginfo.rs
+++ b/rust/src/debuginfo.rs
@@ -252,12 +252,6 @@ unsafe impl RefCountable for DebugInfoParser {
}
}
-impl AsRef<DebugInfoParser> for DebugInfoParser {
- fn as_ref(&self) -> &Self {
- self
- }
-}
-
impl ToOwned for DebugInfoParser {
type Owned = Ref<Self>;
@@ -811,12 +805,6 @@ unsafe impl RefCountable for DebugInfo {
}
}
-impl AsRef<DebugInfo> for DebugInfo {
- fn as_ref(&self) -> &Self {
- self
- }
-}
-
impl ToOwned for DebugInfo {
type Owned = Ref<Self>;
diff --git a/rust/src/disassembly.rs b/rust/src/disassembly.rs
index 950335a3..3d94f3bd 100644
--- a/rust/src/disassembly.rs
+++ b/rust/src/disassembly.rs
@@ -437,12 +437,6 @@ impl DisassemblySettings {
}
}
-impl AsRef<DisassemblySettings> for DisassemblySettings {
- fn as_ref(&self) -> &Self {
- self
- }
-}
-
impl ToOwned for DisassemblySettings {
type Owned = Ref<Self>;
diff --git a/rust/src/downloadprovider.rs b/rust/src/downloadprovider.rs
index 7de8704c..441714b6 100644
--- a/rust/src/downloadprovider.rs
+++ b/rust/src/downloadprovider.rs
@@ -79,12 +79,6 @@ unsafe impl<'a> CoreArrayWrapper<'a> for DownloadProvider {
}
}
-impl AsRef<DownloadProvider> for DownloadProvider {
- fn as_ref(&self) -> &Self {
- self
- }
-}
-
pub struct DownloadInstanceOutputCallbacks {
pub write: Option<Box<dyn FnMut(&[u8]) -> usize>>,
pub progress: Option<Box<dyn FnMut(u64, u64) -> bool>>,
diff --git a/rust/src/flowgraph.rs b/rust/src/flowgraph.rs
index a0e6caaa..0f959429 100644
--- a/rust/src/flowgraph.rs
+++ b/rust/src/flowgraph.rs
@@ -106,12 +106,6 @@ unsafe impl<'a> RefCountable for FlowGraphNode<'a> {
}
}
-impl<'a> AsRef<FlowGraphNode<'a>> for FlowGraphNode<'a> {
- fn as_ref(&self) -> &Self {
- self
- }
-}
-
impl<'a> ToOwned for FlowGraphNode<'a> {
type Owned = Ref<Self>;
@@ -161,12 +155,6 @@ unsafe impl RefCountable for FlowGraph {
}
}
-impl AsRef<FlowGraph> for FlowGraph {
- fn as_ref(&self) -> &Self {
- self
- }
-}
-
impl ToOwned for FlowGraph {
type Owned = Ref<Self>;
diff --git a/rust/src/metadata.rs b/rust/src/metadata.rs
index 1ccb9ae4..09c21ec9 100644
--- a/rust/src/metadata.rs
+++ b/rust/src/metadata.rs
@@ -347,12 +347,6 @@ unsafe impl<'a> CoreArrayWrapper<'a> for Metadata {
}
}
-impl AsRef<Metadata> for Metadata {
- fn as_ref(&self) -> &Self {
- self
- }
-}
-
impl ToOwned for Metadata {
type Owned = Ref<Self>;
diff --git a/rust/src/settings.rs b/rust/src/settings.rs
index d6d3cab4..d5720ff4 100644
--- a/rust/src/settings.rs
+++ b/rust/src/settings.rs
@@ -448,12 +448,6 @@ impl Settings {
// TODO: register_setting but type-safely turn it into json
}
-impl AsRef<Settings> for Settings {
- fn as_ref(&self) -> &Self {
- self
- }
-}
-
impl ToOwned for Settings {
type Owned = Ref<Self>;
diff --git a/rust/src/tags.rs b/rust/src/tags.rs
index bc30cb32..91bd051c 100644
--- a/rust/src/tags.rs
+++ b/rust/src/tags.rs
@@ -69,12 +69,6 @@ unsafe impl RefCountable for Tag {
}
}
-impl AsRef<Tag> for Tag {
- fn as_ref(&self) -> &Self {
- self
- }
-}
-
impl ToOwned for Tag {
type Owned = Ref<Self>;
@@ -172,12 +166,6 @@ unsafe impl RefCountable for TagType {
}
}
-impl AsRef<TagType> for TagType {
- fn as_ref(&self) -> &Self {
- self
- }
-}
-
impl ToOwned for TagType {
type Owned = Ref<Self>;