[S] Change in fuchsia/fuchsia[main]: [zx][rs] Remove unneeded drop impl.

0 views
Skip to first unread message

'Adam Perry (Gerrit)' via owners-override

unread,
Dec 18, 2025, 4:29:40 PM (2 days ago) Dec 18
to Owners Override
Attention needed from Adam Barth and Owners Override

Adam Perry has uploaded the change for review

Adam Perry would like Owners Override to review this change.

Commit message

[zx][rs] Remove unneeded drop impl.

This manually suppresses drop behavior, but that's already
done by ManuallyDrop.
Change-Id: I540b9d5fff04c11705e1e9e8cf6ad8e70709a609

Change diff

diff --git a/sdk/lib/driver/runtime/rust/fidl/src/wire.rs b/sdk/lib/driver/runtime/rust/fidl/src/wire.rs
index fcb2f92..03b29d6 100644
--- a/sdk/lib/driver/runtime/rust/fidl/src/wire.rs
+++ b/sdk/lib/driver/runtime/rust/fidl/src/wire.rs
@@ -303,7 +303,6 @@
};
assert_eq!(unsafe { handle.get_raw() }, handle_raw);
assert_eq!(encoder.data, chunks![0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00],);
- drop(driver_ref);

let arena = Arena::new();
let data = arena.insert_boxed_slice(encoder.data.into_boxed_slice());
@@ -336,7 +335,6 @@
};
assert_eq!(unsafe { handle.get_raw() }, handle_raw);
assert_eq!(encoder.data, chunks![0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00],);
- drop(driver_ref);

let arena = Arena::new();
let data = arena.insert_boxed_slice(encoder.data.into_boxed_slice());
diff --git a/sdk/rust/zx/src/handle.rs b/sdk/rust/zx/src/handle.rs
index afcee69..dc045b8 100644
--- a/sdk/rust/zx/src/handle.rs
+++ b/sdk/rust/zx/src/handle.rs
@@ -10,7 +10,7 @@
object_set_property, ok, sys,
};
use std::marker::PhantomData;
-use std::mem::{self, ManuallyDrop};
+use std::mem::ManuallyDrop;
use std::num::NonZeroU32;

/// An owned and valid Zircon
@@ -199,14 +199,6 @@
marker: PhantomData<&'a T>,
}

-impl<T: Into<NullableHandle>> Drop for Unowned<'_, T> {
- fn drop(&mut self) {
- // SAFETY: This is safe because we don't use this ManuallyDrop again.
- let handle: NullableHandle = unsafe { ManuallyDrop::take(&mut self.inner).into() };
- mem::forget(handle);
- }
-}
-
impl<'a, T: Into<NullableHandle>> ::std::ops::Deref for Unowned<'a, T> {
type Target = T;

diff --git a/src/lib/diagnostics/log/rust/src/fuchsia/mod.rs b/src/lib/diagnostics/log/rust/src/fuchsia/mod.rs
index c689a17..2f41cbb 100644
--- a/src/lib/diagnostics/log/rust/src/fuchsia/mod.rs
+++ b/src/lib/diagnostics/log/rust/src/fuchsia/mod.rs
@@ -270,7 +270,6 @@
else {
return Err(PublishError::MissingOnInit);
};
- drop(proxy);

let publisher = Self::new(opts, iob);

Change information

Files:
  • M sdk/lib/driver/runtime/rust/fidl/src/wire.rs
  • M sdk/rust/zx/src/handle.rs
  • M src/lib/diagnostics/log/rust/src/fuchsia/mod.rs
Change size: S
Delta: 3 files changed, 1 insertion(+), 12 deletions(-)
Open in Gerrit

Related details

Attention is currently required from:
  • Adam Barth
  • Owners Override
Submit Requirements:
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: newchange
Gerrit-Project: fuchsia
Gerrit-Branch: main
Gerrit-Change-Id: I540b9d5fff04c11705e1e9e8cf6ad8e70709a609
Gerrit-Change-Number: 1449290
Gerrit-PatchSet: 2
Gerrit-Owner: Adam Perry <adam...@google.com>
Gerrit-Reviewer: Adam Barth <aba...@google.com>
Gerrit-Reviewer: Adam Perry <adam...@google.com>
Gerrit-Reviewer: Owners Override <owners-...@fuchsia.dev>
Gerrit-Attention: Owners Override <owners-...@fuchsia.dev>
Gerrit-Attention: Adam Barth <aba...@google.com>

--
You received this message because you are subscribed to the Google Groups "owners-override" group.
To unsubscribe from this group and stop receiving emails from it, send an email to owners-overri...@fuchsia.dev.
To view this discussion visit https://groups.google.com/a/fuchsia.dev/d/msgid/owners-override/23d132eaf23d38fa5b14ac3a236c821f460f3720-HTML%40fuchsia-review.googlesource.com.
unsatisfied_requirement
open
diffy

'Adam Barth (Gerrit)' via owners-override

unread,
Dec 18, 2025, 6:59:58 PM (2 days ago) Dec 18
to Adam Perry, Owners Override, GI Try Builder, CQ Bot
Attention needed from Adam Perry and Owners Override

Adam Barth voted Code-Review+2

Code-Review+2
Open in Gerrit

Related details

Attention is currently required from:
  • Adam Perry
  • Owners Override
Submit Requirements:
    • requirement is not satisfiedCode-Owners
    • requirement satisfiedCode-Review
    • requirement satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: fuchsia
    Gerrit-Branch: main
    Gerrit-Change-Id: I540b9d5fff04c11705e1e9e8cf6ad8e70709a609
    Gerrit-Change-Number: 1449290
    Gerrit-PatchSet: 2
    Gerrit-Owner: Adam Perry <adam...@google.com>
    Gerrit-Reviewer: Adam Barth <aba...@google.com>
    Gerrit-Reviewer: Adam Perry <adam...@google.com>
    Gerrit-Reviewer: Owners Override <owners-...@fuchsia.dev>
    Gerrit-Attention: Adam Perry <adam...@google.com>
    Gerrit-Attention: Owners Override <owners-...@fuchsia.dev>
    Gerrit-Comment-Date: Thu, 18 Dec 2025 23:59:51 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: Yes

    --
    You received this message because you are subscribed to the Google Groups "owners-override" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to owners-overri...@fuchsia.dev.
    To view this discussion visit https://groups.google.com/a/fuchsia.dev/d/msgid/owners-override/75c52e7bb38e5037d190dfe766569766f3a3fbb9-EmailReviewComments-HTML%40fuchsia-review.googlesource.com.
    unsatisfied_requirement
    satisfied_requirement
    open
    diffy

    'Adam Perry (Gerrit)' via owners-override

    unread,
    Dec 18, 2025, 7:50:19 PM (2 days ago) Dec 18
    to Owners Override
    Attention needed from Brian Bosak

    Adam Perry has uploaded the change for review

    Adam Perry removed Owners Override from reviewers of this change.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Brian Bosak
    Submit Requirements:
    • requirement is not satisfiedCode-Owners
    • requirement satisfiedCode-Review
    • requirement satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: newchange
    Gerrit-Project: fuchsia
    Gerrit-Branch: main
    Gerrit-Change-Id: I540b9d5fff04c11705e1e9e8cf6ad8e70709a609
    Gerrit-Change-Number: 1449290
    Gerrit-PatchSet: 2
    Gerrit-Owner: Adam Perry <adam...@google.com>
    Gerrit-Reviewer: Adam Barth <aba...@google.com>
    Gerrit-Reviewer: Adam Perry <adam...@google.com>
    Gerrit-Reviewer: Brian Bosak <bbo...@google.com>
    Gerrit-Attention: Brian Bosak <bbo...@google.com>

    --
    You received this message because you are subscribed to the Google Groups "owners-override" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to owners-overri...@fuchsia.dev.
    To view this discussion visit https://groups.google.com/a/fuchsia.dev/d/msgid/owners-override/08ce31ae6943beaca514758ef0d97f0fc35ce76c-HTML%40fuchsia-review.googlesource.com.
    unsatisfied_requirement
    satisfied_requirement
    open
    diffy
    Reply all
    Reply to author
    Forward
    0 new messages