diff --git a/sdk/rust/zx/src/handle.rs b/sdk/rust/zx/src/handle.rs
index fb35c2b..6a6ef87 100644
--- a/sdk/rust/zx/src/handle.rs
+++ b/sdk/rust/zx/src/handle.rs
@@ -685,15 +685,6 @@
NullableHandle::raw_handle(&self.as_handle_ref())
}
- /// Get the [Property::NAME] property for this object.
- ///
- /// Wraps a call to the
- /// [zx_object_get_property](https://fuchsia.dev/fuchsia-src/reference/syscalls/object_get_property.md)
- /// syscall for the ZX_PROP_NAME property.
- fn get_name(&self) -> Result<Name, Status> {
- NullableHandle::get_name(&self.as_handle_ref())
- }
-
/// Set the [Property::NAME] property for this object.
///
/// The name's length must be less than [sys::ZX_MAX_NAME_LEN], i.e.
diff --git a/sdk/rust/zx/src/macros.rs b/sdk/rust/zx/src/macros.rs
index 7b9472d..5d2d336 100644
--- a/sdk/rust/zx/src/macros.rs
+++ b/sdk/rust/zx/src/macros.rs
@@ -87,6 +87,13 @@
) -> Result<(), $crate::Status> {
self.0.wait_async(port, key, signals, options)
}
+
+ /// Wraps a call to the
+ /// [`zx_object_get_property`](https://fuchsia.dev/fuchsia-src/reference/syscalls/object_get_property)
+ /// syscall for the `ZX_PROP_NAME` property.
+ pub fn get_name(&self) -> Result<$crate::Name, $crate::Status> {
+ self.0.get_name()
+ }
};
}
diff --git a/src/performance/memory/attribution/monitor/src/resources.rs b/src/performance/memory/attribution/monitor/src/resources.rs
index 4e284c2..2e1cf54 100644
--- a/src/performance/memory/attribution/monitor/src/resources.rs
+++ b/src/performance/memory/attribution/monitor/src/resources.rs
@@ -274,7 +274,7 @@
}
fn get_name(&self) -> Result<zx::Name, zx::Status> {
- fidl::AsHandleRef::get_name(&self)
+ zx::Job::get_name(&self)
}
fn children(&self) -> Result<Vec<zx::Koid>, zx::Status> {
@@ -323,7 +323,7 @@
impl Process for zx::Process {
fn get_name(&self) -> Result<zx::Name, zx::Status> {
- fidl::AsHandleRef::get_name(self)
+ zx::Process::get_name(&self)
}
fn info_vmos<'a>(
diff --git a/src/starnix/lib/starnix_kernel_runner/src/serve_protocols.rs b/src/starnix/lib/starnix_kernel_runner/src/serve_protocols.rs
index 34cda0d..180ffa8 100644
--- a/src/starnix/lib/starnix_kernel_runner/src/serve_protocols.rs
+++ b/src/starnix/lib/starnix_kernel_runner/src/serve_protocols.rs
@@ -4,7 +4,6 @@
use crate::Container;
use anyhow::{Context as _, Error};
-use fidl::AsHandleRef;
use fidl::endpoints::{ControlHandle, RequestStream, ServerEnd};
use fuchsia_async::{
DurationExt, {self as fasync},
diff --git a/src/starnix/tests/fp_stack_glue/src/lib.rs b/src/starnix/tests/fp_stack_glue/src/lib.rs
index 0c3bfb0..7799a03 100644
--- a/src/starnix/tests/fp_stack_glue/src/lib.rs
+++ b/src/starnix/tests/fp_stack_glue/src/lib.rs
@@ -12,7 +12,7 @@
};
use futures::StreamExt;
use log::{info, warn};
-use zx::{AsHandleRef, Task};
+use zx::Task;
use {
fidl_fuchsia_buildinfo as fbuildinfo, fidl_fuchsia_component_runner as frunner,
fidl_fuchsia_sys2 as fsys,
diff --git a/src/sys/lib/elf_runner/src/vdso_vmo.rs b/src/sys/lib/elf_runner/src/vdso_vmo.rs
index 0af47b1..2bc0f6f 100644
--- a/src/sys/lib/elf_runner/src/vdso_vmo.rs
+++ b/src/sys/lib/elf_runner/src/vdso_vmo.rs
@@ -6,7 +6,7 @@
use fuchsia_runtime::{HandleInfo, HandleType, take_startup_handle};
use std::collections::HashMap;
use std::sync::LazyLock;
-use zx::{self as zx, AsHandleRef, HandleBased};
+use zx::HandleBased;
fn take_vdso_vmos() -> Result<HashMap<zx::Name, zx::Vmo>, VdsoError> {
let mut vmos = HashMap::new();