summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharisee Chiw <chiw@google.com>2023-03-13 20:18:35 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2023-03-13 20:18:35 +0000
commitbb4cf7a53ed8d6d59bf5f63086d487b041e5219c (patch)
tree1fc7dc0cccf840efe572d3adf3c1f13bde1b74e9
parent3a6f5bb995d758d8a39a3d6767bf9fd5f8b26782 (diff)
parentfa93e33610cde38d0046e9db5b639af08d555d95 (diff)
downloadnative-bb4cf7a53ed8d6d59bf5f63086d487b041e5219c.tar.gz
Merge "Change request for Rust v1.68.0" am: fa93e33610
Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/2468800 Change-Id: I3b45af0654f638ec07a25ae394b329f9b23c40cc Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r--libs/binder/rust/src/binder.rs9
1 files changed, 2 insertions, 7 deletions
diff --git a/libs/binder/rust/src/binder.rs b/libs/binder/rust/src/binder.rs
index 976f54d36f..d0e35de3f7 100644
--- a/libs/binder/rust/src/binder.rs
+++ b/libs/binder/rust/src/binder.rs
@@ -100,22 +100,17 @@ where
/// An interface can promise to be a stable vendor interface ([`Vintf`]), or
/// makes no stability guarantees ([`Local`]). [`Local`] is
/// currently the default stability.
-#[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord)]
+#[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Default)]
pub enum Stability {
/// Default stability, visible to other modules in the same compilation
/// context (e.g. modules on system.img)
+ #[default]
Local,
/// A Vendor Interface Object, which promises to be stable
Vintf,
}
-impl Default for Stability {
- fn default() -> Self {
- Stability::Local
- }
-}
-
impl From<Stability> for i32 {
fn from(stability: Stability) -> i32 {
use Stability::*;